Having trouble with this - it works - just doesn't update unless I kick it.
I hollowed out everything to show the flow - there was no special sauce, just if's and for's & assignments
I have to reload or recompile my custom indicator (or change timeframe) to show valid results.The prints of dependant resulting variables show that after a new Get Global Variable on which they depend for calculations they are not changing - even with new ticks coming in.
I have tried a test of new GV to call start() and WindowRedraw all over the place.
Just for's and global variables that you don't show. No mind readers here. The code you show does nothing, so there is nothing to even guess at.
- Is this trying to limit SpM to a range
if(SpM < sm_range_lo) {SpM = sm_range_lo;} else if(SpM > sm_range_hi) {SpM = sm_range_hi;}
or are you trying to enlarge the range? - I assume SpMLast is global. This
if(SpM == SpMLast) NewGlobalVariable = false; else NewGlobalVariable = true; SpMLast = SpM;
can be simplified asNewGlobalVariable = (SpM != SpMLast); SpMLast = SpM;
Just for's and global variables that you don't show. No mind readers here. The code you show does nothing, so there is nothing to even guess at.
- Is this trying to limit SpM to a range
or are you trying to enlarge the range? - I assume SpMLast is global. Thiscan be simplified as
WHRoeder, Thank you for taking your time to check this. I thought perhaps that it may
be fruitless to give just the layout but that maybe someone with more experience might
just spot an obvious mistake.
Yes the SpM was being limited to a range. Thanks for that shortening method tip as well.
There does not happen to be a way to stimulate the terminal to update status of
external variables without reloading indicator or without user action, such as an
indicator command (aside from an EA), does there ?
Your answer did give me an idea on how to approach the problem. Thanks once again.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Having trouble with this - it works - just doesn't update unless I kick it.
I hollowed out everything to show the flow - there was no special sauce, just if's and for's & assignments
and cannot show it but sure hope this layout will tip off the right person to what may be the trouble.
I have to reload or recompile my custom indicator (or change timeframe) to show valid results.
The prints of dependant resulting variables show that after a new Get Global Variable on which
they depend for calculations they are not changing - even with new ticks coming in.
I have tried a test of new GV to call start() and WindowRedraw all over the place.
Only doing one of those updating actions like reload indicator will show everything with the correct results
(in prints and in Labels on chart).
Thanks in Advance
Already learned much here - so thanks in arrears too.