WHRoeder this code is all in my calculation of order execution please i ask to help me to modify my errors and put me through. thank for your williness to help
// Orders accounting
{
datetime lastTime = 0;
int lastTicket = -1; // None open.for(int pos = OrdersTotal()-1; pos >= 0 ; pos--) if (
OrderSelect(0, SELECT_BY_POS,MODE_TRADES) // Only my orders w/
&& OrderMagicNumber() == 0// my magic number
&& OrderSymbol() == Symbol() // and my pair.
&& OrderOpenTime() >= lastTime
&& OrderTicket() > lastTicket
){
lastTime = OrderOpenTime();
lastTicket = OrderTicket();
}
}
Tip =OrderType(); // Type of selected order
Price =OrderOpenPrice(); // Price of selected order
SL =OrderStopLoss(); // SL of selected order
TP =OrderTakeProfit(); // TP of selected order
Lot =OrderLots(); // Amount of lots//////////////////////////////////////////////////////////////////////////////////////////////////////////---------------------------------------- 5 ------------------------------------///*this is the poinnt where main formular or trading system EA-MA is based*///---------------------------------------------------------------------------// Trading criteria
rsi1=iRSI(NULL,0,14,PRICE_CLOSE,1);
rsi2=iRSI(NULL,0,14,PRICE_CLOSE,0);
if(rsi2>70 && Ask > High[1] + (10*pips2dbl) )
{
Opn_S=true;
}
elseif(rsi2>70 && Ask < High[1] + (10*pips2dbl))
{
Opn_S=false;
}
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
WHRoeder on your private massage box i
Send it through my mt5 with a name futureseer in to your mail box.thank
OK I am sorry I should have inform you before sending it..
But WHRoeder i have done improvement on getting last open order according to the formular/steps you gave me... here is the code! is it right.
now if i got the code right how can i then add 10 pip steps to the code since last order is gotten.
WHRoeder this code is all in my calculation of order execution please i ask to help me to modify my errors and put me through. thank for your williness to help