hi,
can any one tell that how can i find a close price of a 15 days ago order ??
thanks
You can code a combination of a while or for cycle and OrderSelect() within an EA to identify an order and its parameters. The while or for cycle should search inside an MT4 order history index using OrdersHistoryTotal() then OrderSelect() will select an order's position number (an order's position number in the MT4 order history's index) to retrieve an order's OrderClosePrice().
Thank youfor(int i=OrderHistoryTotal()-1; i>=0; i--) if( !OrderSelect( i ) ){ return; } if( OrderOpenTime()!=xTime ){ continue; } if( OrderCloseTime()!=xTime){ continue; } Print( OrderClosePrice() ); //Above Code Will Not Compile. Write Your Own.Did you read the Book?
Hello tazz90,
You can code a combination of a while or for cycle and OrderSelect() within an EA to identify an order and its parameters. The while or for cycle should search inside an MT4 order history index using OrdersHistoryTotal() then OrderSelect() will select an order's position number (an order's position number in the MT4 order history's index) to retrieve an order's OrderClosePrice().
Thank youoh thank you so much for your help :)
oh thank you so much for your help :)
Glad to be of service and thanks to ubzen for his posts as well.
Thank you
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
hi,
can any one tell that how can i find a close price of a 15 days ago order ??
thanks