IWO TURNING POINT INDICATOR

#1
Indicator Text For MetaStock

A:= Input("SampleLength",1,200,20);
B:= Input("DevLength",5,200,60);
ROC( CLOSE , A ,% );

BBandTop(ROC( CLOSE , A ,% ) ,B,S ,2 );
BBandTop(ROC( CLOSE , A ,% ) ,B ,S ,1 );
BBandBot(ROC( CLOSE , A ,% ) ,B ,S ,1 );
BBandBot(ROC( CLOSE , A ,% ) ,B ,S ,2 );

THIS IS A TRADINGVIEW AND METASTOCK INDICATOR

The has a few components.
The first is the “Rolling” line.
THIS IS ROC(C,10)
It just shows percent rise or fall in stock price over 10 days

This shows us the rolling returns of a
stock for whatever timeframe we want.
The default setting is a period of 10 trading days, which is the
equivalent of 2 weeks.
So, for an example, if a stock is a reading of 4.7%, that means
it has rallied 4.7% over 10 trading days.
The rest of the lines are volatility bands, using a 60-day
sample. 60 days is about 3 calendar months.

The indicator looks back at all of the rolling returns data, and
calculates the standard deviations.
hope dsome body can code an afl.
this is best used in option trading.

IWO Turning Point Indicator thinkorswim code

declare lower;input length = 10;
input stdLength = 60;
plot rolling = (close - close[length])*100/close[length];
plot updev = StDev(rolling, stdLength);
plot twoupdev = 2*StDev(rolling, stdLength)
;plot downdev = -StDev(rolling, stdLength);
plot twodowndev = -2*StDev(rolling, stdLength);

turning point indicator steven place.png
 
Last edited:
#2
Below is your concept provided. How we can trade? Pl explain
Plot(ROC(c,10), "ROC", colorblue, styleThick);

stdLength = 60;
Rolling=((close - MA(Close,stdLength))*100)/(MA(Close,stdLength));

Plot(Rolling, "Rolling", colorGreen, styleThick);

updev=StDev(rolling, stdLength);
Plot(updev, "updev", colorYellow, styleThick);

twoupdev=2*updev;
Plot(twoupdev, "twoupdev", colorDarkRed, styleThick);

downdev=-StDev(rolling, stdLength);
Plot(downdev, "downdev", colorcustom12, styleThick);

twodowndev=2*downdev;
Plot(twodowndev, "twodowndev", colorCustom16, styleThick);
 
#3
Rolling=((close - MA(Close,stdLength))*100)/(MA(Close,stdLength));
TO START WITH LET US GO BY THIS Above LINE
//=============JUst ignore the think or swim code.

//we dont use roc
This shows rolling is 100*(close-ma60)/ma60
rolling indicates pct rise or fall of close as compared to ma60.
IN STEP TWO
WE COMPUTE STD DEV 1 AND 2 OF ROLLING LINE.


in a separate chart put price and ma60 line

use this chart to gain an idea on how to trade.


if rolling is at zero it means price is near ma60.
if rolling is down 4% it means price dropped 4 % bellow ma60 line.
if rolling s up by 5% it means price is up5% above ma60 line.
you can see overbought and oversold state using the bands.
if not comfortable initially use a ema10 of rolling line. that gives bias up or down.
In the chart shown above it is the rolling line. roc is not in the picture.
========================================
as for the roc based code
we need help metastock traders with coding idea.
 

mastermind007

Well-Known Member
#4
MetaStock Code <> ThinkOrSwim Code <> AFL Code <> Posted Image

AFL shud be written as

Plot(ROC(c,10), "ROC", colorblue, styleThick);

stdLength = 60;
//Rolling=((close - MA(Close,stdLength))*100)/(MA(Close,stdLength));
Rolling=((Close - Ref(Close,-stdLength))*100) / (Ref(Close,-stdLength));
....

updev=StDev(rolling, stdLength);
twoupdev=2*updev;
downdev=-updev;
twodowndev=2*downdev;

Plots are fine....
 
#5
Rolling=((close - MA(Close,stdLength))*100)/(MA(Close,stdLength));
TO START WITH LET US GO BY THIS Above LINE
//=============JUst ignore the think or swim code.

//we dont use roc
This shows rolling is 100*(close-ma60)/ma60
rolling indicates pct rise or fall of close as compared to ma60.
IN STEP TWO
WE COMPUTE STD DEV 1 AND 2 OF ROLLING LINE.


in a separate chart put price and ma60 line

use this chart to gain an idea on how to trade.


if rolling is at zero it means price is near ma60.
if rolling is down 4% it means price dropped 4 % bellow ma60 line.
if rolling s up by 5% it means price is up5% above ma60 line.
you can see overbought and oversold state using the bands.
if not comfortable initially use a ema10 of rolling line. that gives bias up or down.
In the chart shown above it is the rolling line. roc is not in the picture.
========================================
as for the roc based code
we need help metastock traders with coding idea.
Very Good. I saw Nifty the reality of this on today 18/05/2020

Thanks
 
#6
MetaStock Code <> ThinkOrSwim Code <> AFL Code <> Posted Image

AFL shud be written as

Plot(ROC(c,10), "ROC", colorblue, styleThick);

stdLength = 60;
//Rolling=((close - MA(Close,stdLength))*100)/(MA(Close,stdLength));
Rolling=((Close - Ref(Close,-stdLength))*100) / (Ref(Close,-stdLength));
....

updev=StDev(rolling, stdLength);
twoupdev=2*updev;
downdev=-updev;
twodowndev=2*downdev;

Plots are fine....
thank you mastermind.
please take a look at top ultimate breakout indicator post when you get time.
 

Similar threads