- Doesn't adjust for 4/5 digit brokers
- Doesn't test return codes
- Assumes it is the only EA running on once chart.
- Uses no SL
- CloseAllInProfit closes all of that type.
- Adds additional trades to a loosing one.
- Direction depends on your settings - nothing obvious. Did you have history for the time frame you selected?
- How should we know why you "couldn't modify buy order eighter" without seeing YOUR code?
- How should we know why "ADX, it seem not work at all" without seeing YOUR code? No mind-readers here.
Hi,
Thanks for your reply.
Here is code I try :
ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,0,"MLTrendETF",16384,0,Red);
OrderModify(OrderTicket(),OrderOpenPrice(),Ask-0.018,Ask+0.006,0,Red);
It doesn't modify the order.
Thanks
This code:
ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,0,"MLTrendETF",16384,0,Red); OrderModify(OrderTicket(),OrderOpenPrice(),Ask-0.018,Ask+0.006,0,Red);
will not modify a position because you miss this in between:
OrderSelect(ticket,SELECT_BY_TICKET);
or you can use it like this:
OrderModify(ticket,Ask,Ask-0.018,Ask+0.006,0,Red);
This code:
will not modify a position because you miss this in between:
or you can use it like this:
Nope, that isn't correct.
If Ask has changed between placing the Order and trying to Modify it then you can't use Ask . . . use OrderOpenPrice.
Thanks your reply,
but I have an other problem, I can use this one:
iADX(NULL,0,14,PRICE_CLOSE,MODE_PLUSDI,1);
But when I try to use
iADX(NULL,7,14,PRICE_CLOSE,MODE_PLUSDI,1);
iADX return 0.
Could you please help?
Thanks
Thanks, I should put 1440 for day time frame.
But I see a lot: Zero divide
it is because I miss some data? Where I can get a complete data?
Thanks
Thanks, I should put 1440 for day time frame.
But I see a lot: Zero divide
Zero divide is where you have a calculation where you divide one variable by another and the second is zero, example: a=10, b=0, c = a/b
You need to check the values that you are using to divide with . . .
Thanks, I should put 1440 for day time frame.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
When I try to test this code which located: https://www.mql5.com/en/code/10576, I find it only has sell trade, after check the code, find the MT4 could not handle buy order properly, could place lost stop on buy order. I couldn't modify buy order eighter.
And when I try to change the time from for iADX, it seem not work at all.
Could any body help?
Thanks a lot