I'm new to NT script.I try to do the following.If current day range is equal or greater than 30 ticks, then DrawRegion the mid point. Compling is OK but doesn't plot to what I expected. It still plots from the beginning. Any advice will be much appreciated!
mid.Set (Instrument.MasterInstrument.Round2TickSize((curre ntHigh+currentLow)/2));
hhh.Set (currentHigh);
lll.Set (currentLow);
mid1.Set (mid[0]+TickSize*5);
mid2.Set (mid[0]-TickSize*5);
hhh1.Set (hhh[0]+TickSize*5);
lll1.Set (lll[0]-TickSize*5);
RR.Set (currentHigh-currentLow);
R1.Set (RR[0]/TickSize);
if (R1[0]>=30) DrawRegion("Reg1", CurrentBar, 0, mid1, mid2, Color.Transparent, Color.DarkRed,10);
DrawRegion("Reg1", CurrentBar, 0, hhh, hhh1, Color.Transparent, Color.DarkGoldenrod,5);
DrawRegion("Reg2", CurrentBar, 0, lll, lll1, Color.Transparent, Color.DarkGoldenrod,5);
DrawText("MID1", false, mid1.ToString(), 0, mid1[0] ,1, Color.Pink, largeFont, StringAlignment.Near, Color.Transparent, Color.Transparent, 0);
DrawText("MID2", false, mid2.ToString(), 0, mid2[0] ,1, Color.Pink, largeFont, StringAlignment.Near, Color.Transparent, Color.Transparent, 0);
DrawText("MID3", false, hhh.ToString(), 0, hhh[0] ,1, Color.Pink, largeFont, StringAlignment.Near, Color.Transparent, Color.Transparent, 0);
DrawText("MID4", false, hhh1.ToString(), 0, hhh1[0] ,1, Color.Pink, largeFont, StringAlignment.Near, Color.Transparent, Color.Transparent, 0);
DrawText("MID5", false, lll.ToString(), 0, lll[0] ,1, Color.Pink, largeFont, StringAlignment.Near, Color.Transparent, Color.Transparent, 0);
DrawText("MID6", false, lll1.ToString(), 0, lll1[0] ,1, Color.Pink, largeFont, StringAlignment.Near, Color.Transparent, Color.Transparent, 0);
Comment