How to program the std indicator to take to take price from other indicator windows

 
Hello i would like some help with an indicator im using. The indicator is standard deviation. I want it to be modified to do one simple thing, that is to take price and adjust to another indicators window (the same way the native standard deviation included in metatrader does- or like F.E the moving average takes the price from lets say momentum indicator and plots on momentum indicator window), and ill try to take it from there. I tried finding information considering how to achieve this but i just cannot do it

If someone can post the code of the native standard deviation indicator included in the mt4 platform would be just as helpfull i guess cause the native standard deviation indicator can do that.

the indicator is this one:

Files:
stddev.mq4  4 kb
 
alex_000:
Hello i would like some help with an indicator im using. The indicator is standard deviation. I want it to be modified to do one simple thing, that is to take price and adjust to another indicators window (the same way the native standard deviation included in metatrader does- or like F.E the moving average takes the price from lets say momentum indicator and plots on momentum indicator window), and ill try to take it from there. I tried finding information considering how to achieve this but i just cannot do it

If someone can post the code of the native standard deviation indicator included in the mt4 platform would be just as helpfull i guess cause the native standard deviation indicator can do that.

the indicator is this one:



Bump, I just want to be able to be able to add 2 standard deviations to other indicators to measure their volatility (but not using an mo like bollinger bands do), thats why i need the help. I've been trying to do it for days but im not that good in programming and its quite important for me.

 
In MT4(you can in MT5), you can't make a Custom indicator work with another indicators window data by choosing Previous Indicator data or First Indicator data.


But, you can modify the custom indicator to accomplish something similar.

If you want to feed the momentum data to StdDev, then you need to take the essential guts out of the momentum indicator and merge it with the StdDev indicator. Then anywhere that StdDev is looking for Close price(Close[]), you place the buffer(MomentumBuffer[]).

Reason: