/* This loop gets executed if and only if there are zero open orders for(int i=0; i>=OrdersTotal(); i++) // Loop through orders { if (OrderSelect(i+1,SELECT_BY_POS)==true) // If there is the next one */ for(int i=0; i<OrdersTotal(); i++) if ( OrderSelect(i/*+1*/, SELECT_BY_POS) // Only my orders w/ && OrderMagicNumber() == Magic.Number // my magic number && OrderSymbol() == Symbol() ){ // and period and symbol
ma15= iMA(NULL,0,15,0,MODE_EMA,PRICE_CLOSE,0); ma30=iMA(NULL,0,30,0,MODE_EMA,PRICE_CLOSE,0);
You can not access bar zero of other timeframes/pairs in the tester.Ticket=OrderTicket(); // Number of selected order Tip =OrderType(); // Type of selected order ...
Can't use these functions until you OrderSelect()
WHRoeder:
what you mean cannot access bar zero ??? and for orderselect do i need to write a code for orderselect for buy and sell 1st then other funtion . sorry i 1st time writing code
- You can not access bar zero of other timeframes/pairs in the tester.
- Can't use these functions until you OrderSelect()
darkclawer:
what you mean cannot access bar zero ??? and for orderselect do i need to write a code for orderselect for buy and sell 1st then other funtion . sorry i 1st time writing code
what you mean cannot access bar zero ??? and for orderselect do i need to write a code for orderselect for buy and sell 1st then other funtion . sorry i 1st time writing code
https://www.mql5.com/en/articles/1512 5th bullet.
yes.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
can any one point out the mistake i make in this coding it can backtest but it dont have any error in loading and compil
i do not know what wrong with it