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
Oh my god. So stupid.
Ok. Now i how can i compare the current time to the OrderCloseTime() in case of different Timeframes.
Since the close there should be minimum 5 Bars of the current timeframe.
Hi guys,
if a trade was closed i want my EA wait for opening a next trade till 5 bars were finished.
How can i do this?
How do i get the time of the close of the last trade and how can i compare it with the bars?
Thanks guys
Dear FamWue
Have u got the solution ??
Hi guys,
if a trade was closed i want my EA wait for opening a next trade till 5 bars were finished.
How can i do this?
How do i get the time of the close of the last trade and how can i compare it with the bars?
Thanks guys
Dear FamWue,
Have u got the solution for the above problem?
Please share with me because I m having the same problem "trying to identify the time of last trade closed"
Dear FamWue,
Have u got the solution for the above problem?
Please share with me because I m having the same problem "trying to identify the time of last trade closed"
Use iBarShift() with the time to get the bar number of the close.
What are you struggling with ? please show your code . . .
int TotalNumberOfOrders = OrdersHistoryTotal(); //
for(int i = 0; i <=TotalNumberOfOrders - 1 ; i++) //
{
if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)==false) continue; // falls Zeile leer
{
if(OrderType()==OP_BUY && OrderType()==OP_SELL ) {Last=OrderCloseTime(); Alert(OrderCloseTime());}
Get in the habit of counting down - Loops and Closing or Deleting Orders - MQL4 forum
You would never write if( ( (2+2) == 4 ) == true ) would you? So don't write if(bool == true). if(bool) or if(!bool) is sufficient.
The && was previously mentioned.