Forex Factory (https://www.forexfactory.com/forum.php)
-   Platform Tech (https://www.forexfactory.com/forumdisplay.php?f=69)
-   -   Help needing to for indicators with standard deviation (volatility's cycle) (https://www.forexfactory.com/showthread.php?t=209954)

opendo Dec 4, 2009 12:20pm | Post# 1

Help needing to for indicators with standard deviation (volatility's cycle)
 
Hi everyone,
I'm french, sorry for my english (i mean sorry for Sarkozy =D)



I want to check out my set up on a constant range bar chart. Actually i trade on time bars (barchart) using the Pro Realtime software and i'm going to use the metatrader one to test how my set up works with the momentum bars (Constant Range Bar).

But my knowledge in programation even basic, is the worst here i think, so if you have a sec to help me i will send you sun of french riviera =D.

I have two indicators, both based on standard deviation wich help me to estimate the breakout points, volatility pivots, cycles etc. it's a true toolbox

The first one is a channel, i will give more explanation later...
http://a32.idata.over-blog.com/2/90/...6068503285.gif

Here's the code and its meaning.

REM Ricola indicator
/// param1=2
/// param2=5
/// param3=5
/// param4=2

Up=High param1*StandardDeviation[param2](close)
Low=Low-param1*StandardDeviation[param2](close)

Upper=average[param3,param4](Up)
Lower=average[param3,param4]Low)

Return Upper as"Upper band",Lower as"Lower band".

So from the high we add the standard deviation (calculated on the period wich its variable is "param2") multiplied by param1 (wich is the first variable), and from the low we subtract the same thing.

Because of the result, we smooth it with a "param3" (period) moving average. Param4 is the variable to choose the mode of thes averages : param4=1 to get a simple moving average, 2 for an exponential one etc.

So we have 4 variables :

-param1 wich is a coefficient
-param2 wich is the std period
-param3 wich is the average one
-param 4 wich is its way of calcul

I'm keeping up any question, but i think it's OK so.

The second one is an oscillator :
I've just applied the oscillator of Bollinger to the Bandwidth.

What the result ? here are three of one (each one with different settings)
http://a10.idata.over-blog.com/2/90/...6051391447.gif

The code :
REM Vvv 122 indicator
/// param1=14
/// param2=20

BBW=BollingerBandWidth[param1](close)
x=BollingerUp[param2](BBW)
y=BollingerDown[param2](BBW)

z=1+(BBW-y)/(x-y)
Vvv=exponentialaverage[2](exponentialaverage[2](z)


Return Vvv 1 as"cycle"

So as told earlier we apply the oscillator of Bollinger on the Bandwidth.
Then, we smooth twice with two exponential moving averages (period=2) rather than once with a 4 period moving average (as to me, best choice =D)


Finally, to have a faster signal, i do in an other chart Vvv-Vvv[1] to measure the variation of the Vvv's curve.



Thank you all bests regards !!

EDIT :: for the channel i tested aslo with an ATR[5] instead of STD[5]; but i'm not choosy.

Some charts without explanation (sorry) :
http://a7.idata.over-blog.com/2/90/0...nthe021209.jpg
http://a32.idata.over-blog.com/2/90/...7785594175.gif


© Forex Factory