I hope my question will be comprehensible to you, because obviously it is hard to explain here what exactly I am trying to do with my strategy.
I have a custom indicator which calculates the number of days the bar is above or below an EMA and adds them up. I then calculate the average time and I draw a standard deviation line. I am trying to use this indicator information in my strategy and say: I want to stop my long or short orders which are generated from my strategy rules, when the cumulative number of days above or below the EMA, cross above or below the standard deviation line.
I don't understand how could I use part of the information from the custom indicator, to manage orders to my strategy. Do I do this in my strategy code or in the indicator code? If I do this in my strategy, my variables from the indicator code are obviously not recognized.
Please help in case you understand the problem.
Thanks!
Comment