Shaven Top and Bottom

#11
Hi Umeshmandal,

Purush, With active assistance of rkkarnani, I could plot the Opening Bar range on Intraday chart. This is what was my Formula :

{H & L or H-L (range) for first bar of day}
D:=DayOfMonth();
D:=D<>ValueWhen(2,1,D);
H1:=ValueWhen(1,D,H);
L1:=ValueWhen(1,D,L);
H1-L1


Further sir,
When I plot on this Line the MA (of 14 periods of this line, I am getting the average of all values and not the 9:20 bar's average value. How to get that?
I wish to plot the MA of previous 14 candles of 9:20 AM?
A very nice approach in making the formula.

I told you my approach is crude :) here - just for the reason that this approach opens up more possibilities to make more formulae of this type without any external help.

Please follow this approach in two steps

Step 1.

Go to indicator builder.

Click on New.

Name it 'A-Date<>date'

and write

DayOfMonth()<>Ref( DayOfMonth(),-1)


click OK

Step 2.

Go to indicator builder.

Click on New.

Name it ' A-Vauewhen date<>date'

and write

(ValueWhen(1, Fml( "A-Date<>date")=1 ,H-L ) +
ValueWhen(2, Fml( "A-Date<>date")=1 ,H-L ) +
ValueWhen(3, Fml( "A-Date<>date")=1 ,H-L ) +
ValueWhen(4, Fml( "A-Date<>date")=1 ,H-L ) +
ValueWhen(5, Fml( "A-Date<>date")=1 ,H-L ) +
ValueWhen(6, Fml( "A-Date<>date")=1 ,H-L ) +
ValueWhen(7, Fml( "A-Date<>date")=1 ,H-L ) +
ValueWhen(8, Fml( "A-Date<>date")=1 ,H-L ) +
ValueWhen(9, Fml( "A-Date<>date")=1 ,H-L ) +
ValueWhen(10, Fml( "A-Date<>date")=1 ,H-L ) +
ValueWhen(11, Fml( "A-Date<>date")=1 ,H-L ) +
ValueWhen(12, Fml( "A-Date<>date")=1 ,H-L ) +
ValueWhen(13, Fml( "A-Date<>date")=1 ,H-L ) +
ValueWhen(14, Fml( "A-Date<>date")=1 ,H-L ))/14


click OK.

You pl call this indicator made under step 2. It will return the first bars'average (H-L) for 14 period. remember it's the FIRST BAR IRRESPECTIVE OF PERIODICITY - IT FOLLOWS YOUR CHART PERIODICITY - means if the chart is 5 min bar chart, you will get 5 min (h-l) average, if it is 15 min chart, you will get 15 min (h-l) average and so on.

You may name the indicators as you wish. but pl do take care while calling them.

Hope I'm not confusing you. If any confusion comes in pl post.

Regards

purush
 

umeshmandal

Well-Known Member
#12
Hi Umeshmandal,



A very nice approach in making the formula.

I told you my approach is crude :) here - just for the reason that this approach opens up more possibilities to make more formulae of this type without any external help.

Please follow this approach in two steps

Step 1.

Go to indicator builder.

Click on New.

Name it 'A-Date<>date'

and write

DayOfMonth()<>Ref( DayOfMonth(),-1)


click OK

Step 2.

Go to indicator builder.

Click on New.

Name it ' A-Vauewhen date<>date'

and write

(ValueWhen(1, Fml( "A-Date<>date")=1 ,H-L ) +
ValueWhen(2, Fml( "A-Date<>date")=1 ,H-L ) +
ValueWhen(3, Fml( "A-Date<>date")=1 ,H-L ) +
ValueWhen(4, Fml( "A-Date<>date")=1 ,H-L ) +
ValueWhen(5, Fml( "A-Date<>date")=1 ,H-L ) +
ValueWhen(6, Fml( "A-Date<>date")=1 ,H-L ) +
ValueWhen(7, Fml( "A-Date<>date")=1 ,H-L ) +
ValueWhen(8, Fml( "A-Date<>date")=1 ,H-L ) +
ValueWhen(9, Fml( "A-Date<>date")=1 ,H-L ) +
ValueWhen(10, Fml( "A-Date<>date")=1 ,H-L ) +
ValueWhen(11, Fml( "A-Date<>date")=1 ,H-L ) +
ValueWhen(12, Fml( "A-Date<>date")=1 ,H-L ) +
ValueWhen(13, Fml( "A-Date<>date")=1 ,H-L ) +
ValueWhen(14, Fml( "A-Date<>date")=1 ,H-L ))/14


click OK.

You pl call this indicator made under step 2. It will return the first bars'average (H-L) for 14 period. remember it's the FIRST BAR IRRESPECTIVE OF PERIODICITY - IT FOLLOWS YOUR CHART PERIODICITY - means if the chart is 5 min bar chart, you will get 5 min (h-l) average, if it is 15 min chart, you will get 15 min (h-l) average and so on.

You may name the indicators as you wish. but pl do take care while calling them.

Hope I'm not confusing you. If any confusion comes in pl post.

Regards

purush
Sorry, I missed this Post of yours. Saw it today. Thanks :thumb: once more for this effort. May continue to bother you ! :eek: :p :D
 

Similar threads