Lavoro terminato
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Specifiche
I need a coder to make this rule for me, so I can integrate it in my EA.
The strategy is to count from last Orders open price,
if price goes up X-pips, it opens a BUY (POS1), then if price goes down X-pips, it opens a SELL (POS2).
So far so good.
But then if the price goes up again X-Pips, it would open again at the same
price as the existing opened BUY, but we want it to go further up from here the
X-Pips before it is allowed to open a
BUY (POS3).
If the existing Opened BUY is more than 2 positions away, it is allowed to open
the BUY at the same price.
//=========== Code
int tick=GetLastPositionTicket();
if(OrderSelect(tick,SELECT_BY_TICKET) && GVGet("Stopped")==0 && GVGet("Start")==1)
{
if((OrderOpenPrice()-Bid)/(Point*P)>Distance_Down)sell=true;
if((Ask-OrderOpenPrice())/(Point*P)>Distance_Up)buy=true;
}
//==============