Serving Traders Since 2005
|
|
|
|||||||
| MetaTrader Expert Advisors Post and discuss the MetaTrader expert advisors here. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
It's quite easy to do. You just have to add a code to check if the current number of bars is greater than the previous number of bars. Then you can continue trading if there were new bars and return if the amount of bars is the same. In MQL4 it would look like this:
Bars is a system variable for the amount of bars in the charts. LastBars should be declared as a global variable (int). In MQL5 you just have to use Bars() function instead of the Bars variable: Hope that helps.
__________________
Please, read the Forum Rules and the Signature Rules to avoid termination of your account. |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Happy Halloween - 50% Off! | Linaddd | Advertisements | 0 | 1st November 2009 07:26 |
| happy earnings forex | forex-happy | Advertisements | 0 | 26th January 2009 00:50 |
| Happy earnings | forex-happy | Advertisements | 0 | 3rd January 2009 17:50 |