Jump to content

CrazyHedge EA


Recommended Posts

  • Replies 400
  • Created
  • Last Reply

Top Posters In This Topic

hi synergy;

 

on your previous post you wrote this "This is a hedging EA, when it first started, it will always open 3 buy and 3 sell position to hedge. Once the TP is hit, it will open multiple trades on the same direction up to the maximum limit set by the trading platform - mine is 120."

 

120--is that the max total trades both buy and sell or just buy or sell; so it would be 120 for buy and 120 for sell.

 

where do i set this? i looked in the settings and it is not there.

 

thank you,

Link to comment
Share on other sites

fortuna:

 

could you please explain what this means in your sentence "Yes it will sell only but not putting multi non stop position."

 

When in settings you put max_orderbuy=0 this EA will open only sell positions. When you have in settings tp=3, it will open next sell position after price break 3 pips. Than it will close after price hit 3 pips and open next sell position etc. But it will open not as much as 120 non stop as your Broker and your account allow you.

Link to comment
Share on other sites

It is only semi EA that helps to open many positions with only bull trend. When is bearish trend better close all orders and run from the market fast :). I can tell you what to change in the code for bearish trend.

 

It is example of hedging EA:

 

http://codebase.mql4.com/6601

 

For counting orders here for example;

 

http://codebase.mql4.com/6474

Edited by Fortuna
Link to comment
Share on other sites

So far this EA performs very differently with different brokers. In general though it will fail completely with 4 digit brokers, works on some 5 digit brokers with time frame of M5 or so on moving pairs. How about a price line setting of some sort, for example if EA is above the line only buy if below only sell and reverse if market reverses? Pretty much you should win eventually trading reasonable lots as long as market is not ranging. Of course it is just an idea and all trades should be closed either at a set basket profit or manually.
Link to comment
Share on other sites

As stated before, the EA will not close the buys, because the OrderClose function will not close a buy at the Ask price, only the Bid price. Better yet, it should have OrderClosePrice() instead of Ask and Bid on both OrderClose functions. The only problem then is that this thread will die out because the bug in the program is the only interesting part. You could give it another bug and put "Bid" in for the sell OrderClose, or delete both OrderClose functions (put // in front) and then you would have a double whammy going both ways. Might be interesting...or horrifying...but we're already on a crazy trend here anyway...
Link to comment
Share on other sites

As stated before, the EA will not close the buys, because the OrderClose function will not close a buy at the Ask price, only the Bid price. Better yet, it should have OrderClosePrice() instead of Ask and Bid on both OrderClose functions. The only problem then is that this thread will die out because the bug in the program is the only interesting part. You could give it another bug and put "Bid" in for the sell OrderClose, or delete both OrderClose functions (put // in front) and then you would have a double whammy going both ways. Might be interesting...or horrifying...but we're already on a crazy trend here anyway...

 

Hi Stovedude!

 

you´re totally right that´s why i need someone to do it well, cause i found some others programmers who are working on it but till yet i have no news. can you do it please ?

 

Thanks Advance

 

Mike

Link to comment
Share on other sites

As stated before, the EA will not close the buys, because the OrderClose function will not close a buy at the Ask price, only the Bid price. Better yet, it should have OrderClosePrice() instead of Ask and Bid on both OrderClose functions.

 

That won't work. You can not use OrderClosePrice() to close an order. That function is only used as reference to check at which price an order did close.

See here for more info:

 

I have cleaned up the code, made it a bit more efficient and changed the way it buys/sells.

The EA should run on 4 digit brokers now as well, and of course also on 5 digit brokers, ECN or not.

 

I did not change any logic at this point.

 

Have a go. Let's see if we can further improve.

 

http://www.mediafire.com/?yyu3yzjngmg

Thanks for the kudos...much appreciated!
Link to comment
Share on other sites

That won't work. You can not use OrderClosePrice() to close an order. That function is only used as reference to check at which price an order did close.

See here for more info:

 

I have cleaned up the code, made it a bit more efficient and changed the way it buys/sells.

The EA should run on 4 digit brokers now as well, and of course also on 5 digit brokers, ECN or not

 

I did not change any logic at this point.

 

Have a go. Let's see if we can further improve.

 

http://www.mediafire.com/?yyu3yzjngmg

 

 

Thanks a lot!

 

But I come also to discover something, i´ve changed the Ea manager that was swiss army with EB-turbo and it´s doing well now, closes buy and sell normally.

Link to comment
Share on other sites

Just to set the record straight, you can use OrderClosePrice() for open orders. It returns the ask or bid price that you see in your terminal on the right. For some reason, it was more reliable in backtesting, because I had errors (or no response-I can't remember which) trying to use the Ask or Bid. It probably depends on the broker.

 

Anyway, how is the testing coming?

Link to comment
Share on other sites

with the modified crazyhedge from san , i have made following set: TF 4H, TP 5, SL 30 or 40, TS: 2 and it´s perfoming well :)

 

PS: for brokers where it just makes buy positions, i recommend a Daily TF.

 

Do u use it on multi pairs or only on GBP on TF 4H? I'm asking, bc regards backtest on 4 dig Tadawulfx it doesnt matter what TF - its loosing...

Edited by pro
Link to comment
Share on other sites

Do u use it on multi pairs or only on GBP on TF 4H? I'm asking, bc regards backtest on 4 dig Tadawulfx it doesnt matter what TF - its loosing...

 

first of all on backtest you will have always lost trades! that´s why it unusual to backtest it! yes i use it on multipairs. you know the ea, to heal its crazyness you have to give it a long TF as it works according to the direction of the trade. everything depends also on the speed of your connection in one hand and the speed of your broker in other hand. in all cases you have to set it for long TF and like that you´re 70 % sure that you win!

Edited by ekilibrium
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...