Hello all
I trying to develop an EA...so I define some base condition but the expert doesn't attend them...
thanks.
Remove this line. it's used to close a position, not to open a position.
mrequest.position = position_ticket; // ticket of the position
What is this for? It does not make any sense.
if(mrequest.volume) { mrequest.volume=NormalizeDouble(mrequest.volume,2); Print("Lots to buy: ",mrequest.volume); } else Print("Problem to buy: ",mrequest.volume);
Remove this line. it's used to close a position, not to open a position.
What is this for? It does not make any sense.
Actually that line I didn't use yet but i need that .....
This is not an optional line of code.
This is an explicit order to close a position with a specific ticket number.
If you put this line here instead of commenting it out, it will try to close a position instead of opening a new position.
This is not an optional line of code.
This is an explicit order to close a position with a specific ticket number.
If you put this line here instead of commenting it out, it will try to close a position instead of opening a new position.
if(!PositionSelect(_Symbol))
This is the wrong way to use PositionSelect().
You may want to use
if(PositionsTotal()==0)
instead.
- www.mql5.com
This is the wrong way to use PositionSelect().
You may want to use
if(PositionsTotal()==0)
instead.
Try relaxing your entry criteria first.
Make sure the position opening function works properly.
Test with more historical data.
What your eye sees may not be accurate.
- www.mql5.com
Try relaxing your entry criteria first.
Make sure the position opening function works properly.
Test with more historical data.
What your eye sees may not be accurate.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello all
I trying to develop an EA...so I define some base condition but the expert doesn't attend them...
thanks.