I have been working on an indicator for a while that the NT team has been very helpful in helping me complete. Thanks so much to the team at NT as it is now working beautifully! Recently I found an idea that I would like to add to my indicator that will place a drawing (line, circle, dot, whatever) at a pivot point on the chart. These points are determined by a math equation and a difference in the HLC of the previous day and the open of the present day. Here is a sample of the formula;
//PIVOT POINTS BASED ON MARKET CONDITIONS
//For Decling market (today's open is lower than yesterday's open)
//Upper Pivot Point = sum of yesterday's (((high + close)+(low*2))/2)-low)
//declineupperpivot = (((PriorDayHLC(BarsArray[1]) .PriorHigh[0]) +(PriorDayHLC(BarsArray[1]) .PriorClose[0])) + (PriorDayOHLC(BarsArray[1]) .PriorLow[0] * 2) /2)) - (PriorDayOHLC(BarsArray[1]) .PriorLow[0];
//Lower Pivot Point = sum of yesterday's (((high + close)+(low*2))/2)-high)
//declinelowerpivot = (((PriorDayHLC(BarsArray[1]) .PriorHigh[0]) +(PriorDayHLC(BarsArray[1]) .PriorClose[0])) + (PriorDayOHLC(BarsArray[1]) .PriorLow[0] * 2) /2)) - (PriorDayOHLC(BarsArray[1]) .PriorHigh[0];
Note that the BarsArray[1] is based on a period time set of 1440 minutes.
My questions are thus;
1. Does the use of PriorDay statements look correct?
2. What part of this statement goes under "protected override void Initialize()" and what part goes under "protected override void OnBarUpdate()"?
I truly appreciate any assistance provided.
Best regards,
Dolfan
Comment