so the newbar function is preventing the ea from alerting me? but i only want to be alerted once per bar... thanx for the tip...ill go look for ways to alert only once per bar instead of using the new bar function.
mqlearner:
so the newbar function is preventing the ea from alerting me? but i only want to be alerted once per bar... thanx for the tip...ill go look for ways to alert only once per bar instead of using the new bar function.
Yep, exactly . . .
Set a global variable to true when a new bar forms, if the condition occurs when you want to sound the alert check if the variable is true, if it is perform the alert and set the variable false . . . repeat.
Call newbar ONLY once, the second call will ALWAYS return false.
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
hi guys,
I am stumped here... I am trying to get an alert when the new bars high is higher than the last bars high or the low lower than the last bars low...
I have tried to do it like this... (it doesnt work...any ideas why? ) im running it on a 5min chart to test it