BB of stochastic

Posted By: deweymcg

BB of stochastic - 07/24/13 18:55

I am trying to code a strategy I am using on MT-4 so I can do back testing etc.

One of the conditions is pretty easy to set up on a chart, but I don't have a clue how to code this. On a chart I add the stochastic indicator then add the Bollinger bands to the same window and apply the BB's to the previous indicator's data (the stoch). The condition I am looking for is when the stoch travels outside the BB.

These PICs should explain it if this doesn't make sense:

http://i.imgur.com/DbtuxPy.jpg

http://i.imgur.com/mCZPXvh.jpg

How do I apply one indicator to another like this?

Thanks
Posted By: Anonymous

Re: BB of stochastic - 07/25/13 12:52

Should be simple. Check the example at the bottom of this page: http://zorro-trader.com/manual/en/ta.htm

It says: BBands(series(price()),30,2,2,MAType_SMA); meaning that's the Bollinger Band of the price series.

As you would like to apply BB to the Stochastic indicator instead of price, just replace price() with Stoch() call and that should be it. Stoch() parameters are explained on the same page.
© 2024 lite-C Forums