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
using index 1 you are asking for the last bar value not the current value, so it will only update when there is a new bar
yes i need the close bar value not current one, sorry if i didn't mention it clearly. either way even when a new bar is formed it will not update the value of the new previous bar
It's normal, you must no redefine your ema10_global as double in your global AND in you ontick...
then :
sorry but ema10_global was defined only once, in the global. the on tick variable is called ema10.
thanks for your edit, but even with your code it still doesn't fix the issue of global variables not being updated...
yes i need the close bar value not current one, sorry if i didn't mention it clearly. either way even when a new bar is formed it will not update the value of the new previous bar
sorry but ema10_global was defined only once, in the global. the on tick variable is called ema10.
thanks for your edit, but even with your code it still doesn't fix the issue of global variables not being updated...
I'm sorry but when bar is closed, value don't change.
If you want your ema10_global updated at every closed bar, you need to update it like this:
I'm sorry but when bar is closed, value don't change.
it wont change for that particular bar but the value is aiming for the previous bar, which changes with every new bar
it wont change for that particular bar but the value is aiming for the previous bar, which changes with every new bar
it wont change for that particular bar but the value is aiming for the previous bar, which changes with every new bar
it works just fine for me...
yeah, see previous reply, you forget to update your ema10_global...
wow ok that does the trick! so thankful for your help
had no idea you can use such a neat way to update, much appreciated!!
it works just fine for me...
yes now its working, wasn't aware you can update global from functions
thanks guys for the lesson
wow ok that does the trick! so thankful for your help
had no idea you can use such a neat way to update, much appreciated!!
yes now its working, wasn't aware you can update global from functions
thanks guys for the lesson
You're welcome :-)