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
Can anyone check if the drawing restriction in the indicator works?
Already downloaded the ready-made indicator from here , still draws for the whole story.
Upd I have figured it out. It should be put in OnCalculate and set adequate value (rates_total-n).
On weekdays, when there are quotes, the same thing.
Sometimes it slips through and shows what you need, but when you change the TF or get a new quote, it starts giving nonsense again.
I am trying to draw a template of multicurrency indicator.
I have declared the buffers, initialized them (EMPTY_VALUE), where to draw from... I have done everything. In OnInit. In OnCalculate - nothing.
I run it and get rubbish in the indicator window on different parts of the chart.
What is wrong?
One more thing. When I change the parameters in the f_comment function and recompile it, the comment does not change, the changes take effect only after I remove and put the indicator on the chart again. Is it ok?
ps reuploaded the file
I am trying to draw a template of multicurrency indicator.
I declared buffers, initialized (EMPTY_VALUE), where to draw from... I have done everything. In OnInit. In OnCalculate - nothing.
Run it - I get rubbish in indicator window on different chunks of chart.
What is wrong?
I don't see any rubbish when I run this code. Try to delete all copies of the indicator from the chart and load them on the chart again.
I've been sitting with it for a week, I've thrown everything out, only left empty arrays, but it still periodically draws from empty buffers... It still draws periodically with empty buffers...
I've been working with it for a week, I've discarded everything, leaving only empty arrays, but it still occasionally draws from empty buffers... What a load of crap.
Clicked through the timeframes. At first the rubbish came out. Then it disappeared and no longer plays.
Probably a hard to catch microbug. )) But it's not a problem. You can (and should) just keep a stricter control (just in case). When calculating the values for the indicator buffers no problems will occur. And where values are supposed to be empty, just re-specify an empty value already for a particular array element.
I've been sitting with it for a week, I've thrown everything out, only left empty arrays, but it still periodically draws from empty buffers... It still draws periodically with empty buffers...
Found one bug:
But I didn't see any rubbish before or after editing. Just an empty window.I clicked through the timeframes. At first the rubbish came out. Then it disappeared and doesn't play anymore.
Probably a hard to catch microbug. )) But it's not a problem. You can (and should) just keep a stricter control (just in case). When calculating the values for the indicator buffers no problems will occur. And where values are supposed to be empty, just re-specify an empty value already for the particular array element.
Heh... I'll have to dint where it is, in INDICATOR_DATA or in INDICATOR_CALCULATIONS
The trick is that after removing the indicator and putting it on the chart again, the rubbish is drawn in the same places where it was. This is also a trick.
Control, that's understandable. I will still see it visually, if it starts lying. But when I call some indication, will I have to re-calculate its values?
That's a bit crooked...
Found one bug:
But I didn't see any rubbish before or after editing. Just a blank window.Thanks, I missed it when I was copying it.
The rubbish appears, unstable and not on all TFs (or out of range, need to look at the chart to the left), but it is there.
upd it is still visible here, should be 0.000000 0.000000... everywhere
I've been sitting with it for a week, I've thrown everything out, only left empty arrays, but it still periodically draws from empty buffers... It still draws periodically with empty buffers...
Not sure, but that's probably why:
from the help:
Initializing an array with expression ArrayInitialize(array, init_val) does not mean initializing the elements of the reserve allocated for this array with the same value. Subsequent resizing of array with ArrayResize() within the current reserve adds elements to the end of the arraywhose values are undefined and, most often, not equal to init_val.