Indicators Appearing
-
Hi, is there an easy way to get the previous 2 value which appeared on the indicator
-
If they are on fixed candles, it's easy. Otherwise there is no block with this functionality for the moment.
-
this is an example of what im trying to do to get the latest 2 value. but i still cant seem to get the values out. can you help me check the problem?
......
test.xml -
"Indicator is visible" should be used here. You are on a right track, but as you can see, it's not a very elegant way of doing this with blocks. It's much better to do it in plain code, because it's just a simple loop, "break;" is a good idea and also some cache can be used (to not repeat the same job over and over again).
I will eventually do this somehow - in the Condition block or as additional block, I still don't know how it will be better (because this is not the only thing that can be extracted from indicators).
Something that will not make the EA slow will be to do it "in the future". Let's say you have 2 variables. When a new fractal is detected, then you modify their values. But in this case the EA needs to work for some candles until 2 arrows appear. Well, if you put a loop in "on Init", very similar to what you have now, then you will have maybe the best way of doing this - it will work from start and it will work fast.
-
i got it working thanks.
its for when initialising the ea starting parameters.
im currently using that 2 buffer variables method for the on ticks section.
it would be great to have this as a feature next time though .