Perhaps you could mention in what way the EA "does not work", does not compile ? crashes when run ? will not open trades ? opens too many trades ? incorrect MM ? what exactly "does not work" mean ?
it doesn't open trades and the smiley is upset :(.
it doesn't open trades and the smiley is upset :(.
You have to enable live trading in Expert advisors parameters
Perhaps you could mention in what way the EA "does not work", does not compile ? crashes when run ? will not open trades ? opens too many trades ? incorrect MM ? what exactly "does not work" mean ?
This makes no sense . . .
if(15 > pipekolly > 4.5)
Read this thread: https://www.mql5.com/en/forum/141790
Why do this ?
if(iClose(Symbol(),Period(),1)>iOpen(Symbol(),Period(),1))//BULLISH
when this is the same and faster ?
if( Close[1]) > Open[1] ) //BULLISH
What is the point of this ?
if (0 == 0) expire = 0;
when do you think 0 is not equal to 0 ?
and this . . .
if (true)
when is true ever not true ? why is the if needed ?
This makes no sense . . .
Read this thread: https://www.mql5.com/en/forum/141790
Why do this ?
when this is the same and faster ?
What is the point of this ?
when do you think 0 is not equal to 0 ?
and this . . .
when is true ever not true ? why is the if needed ?
I took care of everything you mentioned:
if(15>pipekolly && pipekolly>4.5) if(Close[1]>Open[1])
and also deleted that two if but it does not open trades.
FWIW sometimes I use
various forms of
if (true) { if (false) {when debugging. To make a block of code always/never fire. Advantage over using multi-line comments is that it works with different nested levels, it works if multi-line comments already present in the code block... easy to find them and deactivate them with a single word change (compared to multi-line comments unless you dont use multi-line comments for anything else), when finished testing. However given other errors in the code this might not be the case!This is just a personal style thing for me, that I've found useful over the years (with C its even shorter - if(0) or #if 0 ) and I dont always use it, mainly if temporarily deactivating a large block of code that already has multi-line comments..
I took care of everything you mentioned:
and also deleted that two if but it does not open trades.
What happens when you run it in the Strategy Tester ?
No order took palce and result is zero.
Your OrderModify() will fail . . .
bool ret = OrderModify(OrderTicket(), OrderOpenPrice(), roundpipekolly, roundpipekolly, 0, Blue);
roundpipekolly comes from here . . .
pipekolly= MathAbs(iClose(Symbol(),Period(),1)-iOpen(Symbol(),Period(),1))*10000; roundpipekolly= MathRound(pipekolly);
and looks like it is in pips or points . . . TP and SL in your OrderModify() need to be prices and can't be the same value.
No order took palce and result is zero.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use