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
Here's an indicator:
Only note that, according to your conditions, the indicator may draw both buffers on the zero bar.
Here's an indicator:
Please note that, according to your conditions, the indicator may draw both buffers at zero bar.
To avoid drawing two buffers, you need to zero out the other buffer when one is full
Do you have a solution code?
Like many others, I have more than one solution to your question. Because indicators can be different in nuances (the tasks they perform/code/intervals of calculation, in general, many factors).
Here's an indicator:
just note that according to your conditions, the indicator can draw both buffers at zero bar.
Are you all shitting me or do you really have no idea what the problem is?
Here is your indicator when you change TF on unloaded history.
:)))))))))))))))))))))))))))))))))))))))))))
Like many others, I have more than one solution to your question. Because indicators can be different in nuances (the tasks they perform/code/intervals of calculation, in general, many factors).
Are you all bullshitting me or do you really have no idea what the problem is?
Here is your indicator for TF change on unloaded history.
:)))))))))))))))))))))))))))))))))))))))))))
Can you tell me what manipulations you use to achieve such an interesting picture? And I hope you will be more reticent in the future.
Added: I mentioned above that you need to think about the content of the indicator buffers yourself when pumping up the history:
Forum on trading, automated trading systems and trading strategy testing
Changing TFs is a problem
Karputov Vladimir, 2015.12.07 10:09
You have two variables at your disposal: prev_calculated and rates_total. By controlling the history loading (with prev_calculated==0) you have to think about what to do with the indicator buffers - the usual behaviour in such cases is to equate the history loading to the first indicator loading event.But you ignored it for some reason and didn't want to make edits.
Anyway here is version 1.43 (here are my corrections and corrections fromAlexey Viktorov):
Forum on trading, automated trading systems and strategy tester
TF change - problem
Alexey Viktorov, 2015.12.07 12:52
If you want to avoid drawing two buffers, you have to reset one buffer to zero when it is full.
:
Could you tell us what manipulations you use to achieve such an interesting picture? And I hope you will be more reticent in the future.
I open a chart of a currency pair I've never opened before. M1, for example. I attach your indicator. I change it to M5.
So I was right? We need to reset the arrow buffers?
mql4
Nope. Here's with your design on a pair where there was no history.
What is THIS?
As I thought, the loop is rooted internally. Also, since in the loop body you access the previous bar ([i+1]), you should start calculation not earlier than from the second bar in history (counting from the left). And buffers must be filled at each bar ALL, not just one. Well, or initialize them beforehand in OnInit().
Anyway, here's version 1.43 (my corrections andAlexey Viktorov' s corrections here):
:
Vladimir, why are you doing this inside OnCalculate()? I mean the last two lines - re-initialization of arrays. Both buffers are calculated on each bar, it's an unnecessary action.
WHAT IS THIS?
As I thought, the loop is corrupted internally. Besides, if you access the previous bar in the loop body ([i+1]), then the calculation should start not earlier than from the second bar in the history (counting from the left). And buffers must be filled at each bar ALL, not just one. Well, or initialize them beforehand in OnInit().