I'm trasitioning from Metastock to NT and slowly adapting to the syntax's big differences.
I'm attempting to create an indicator that will calculate and plot the High and Low from two days ago and also calculate and plot the Monday High and Low.
My Metastock script for this is:
{Start Of Day}
SOD := DayOfMonth()<>Ref(DayOfMonth(),-1);
Hi := HighestSince(1,SOD,H);
Lo := LowestSince(1,SOD,L);
{2 Days ago High/Low}
B4YestHigh := ValueWhen(2,SOD,Ref(Hi,-1));
B4YestLow := ValueWhen(2,SOD,Ref(Lo,-1));
{Monday High/Low}
MonHigh := ValueWhen(1,DayOfWeek()=1,Hi);
MonLow := ValueWhen(1,DayOfWeek()=1,Lo);
After much searching & reading, I gather that for NT I should use the following functions:
Bars.Get.DayBar(2).High
Bars.Get.DayBar(2).Low
DayOfWeek.Monday
But I'm getting lost with these NT functions and NT syntax as I try to recreate the same Metastock script.
Any help is greatly appreciated.
Comment