I know that you can measure the difference in price between the current price and moving average. And there are several other objects that can be used for this sort of calculation. But is there any form of a straight line that can be used to measure this difference? In particular I'm working with OBJ_STDEVCHANNEL which does not allow for this type of calculation. I would like to measure the distance in pips from the current price to either the high or low standard deviation straight line.
Thanks
It's not easy to do that. There's plenty Standard Deviation Channel CI here in this forum that does not utilize Object, try iRegr with degree = 1.
Good luck.
I know that you can measure the difference in price between the current price and moving average. And there are several other objects that can be used for this sort of calculation. But is there any form of a straight line that can be used to measure this difference? In particular I'm working with OBJ_STDEVCHANNEL which does not allow for this type of calculation. I would like to measure the distance in pips from the current price to either the high or low standard deviation straight line.
You pretty much have to do the work yourself with the regression line and standard deviation objects. They look nice on the charts but don't tell you what you want to know!
You could of course use a Bollinger band indicator (using iBands from an EA). This is not what you asked for, but would be a simpler alternative since you can read the upper and lower band values directly. If that is not acceptable then lift the regression line code from one of the indicators in the code base, use iStdDev to get the standard deviation, and you're nearly there.
I think I get it: any of the technical indicators like iMA, iBands, iEnvelopes can be used for calculations on their lines but they cannot be drawn in an EA. However, all of the ObjectCreate functions can be drawn in the EA but their lines can not be use for calculations.
I wonder if capture my own array and use something like iBandsOnArray. Will that draw an object in an EA that can be used for calculations? Back to the drawing board -- I'll give it a try.
I wonder if capture my own array and use something like iBandsOnArray. Will that draw an object in an EA that can be used for calculations?
Drat! I guess if I want to see what my calculations are doing I have to go back to creating an Indicator and use iCustom.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I know that you can measure the difference in price between the current price and moving average. And there are several other objects that can be used for this sort of calculation. But is there any form of a straight line that can be used to measure this difference? In particular I'm working with OBJ_STDEVCHANNEL which does not allow for this type of calculation. I would like to measure the distance in pips from the current price to either the high or low standard deviation straight line.
Thanks