This program requires the DateTimeFunction plug in:
// Defines market hours MarketOpen = 93000; MarketClose = 161500; MarketHours = deFlagTimeRange(MarketOpen, MarketClose); FirstBarOfDay = deFlagFirstBarOfDay(MarketOpen); LastBarOfDay = deFlagLastBarOfDay(MarketClose); enumMarketHours = BarsSince(FirstBarOfDay); DaysBack = 1; YesterdaysHigh =ValueWhen(Ref(deFlagLastBarOfDay(MarketClose),-1),deTimeRangeHHV(H,MarketOpen,MarketClose),DaysBack); YesterdaysLow =ValueWhen(Ref(deFlagLastBarOfDay(MarketClose),-1),deTimeRangeLLV(L,MarketOpen,MarketClose),DaysBack); YesterdaysOpen = ValueWhen(deFlagLastBarOfDay(MarketOpen),O,DaysBack); YesterdaysClose =ValueWhen(Ref(deFlagLastBarOfDay(MarketClose),-1),C,DaysBack); // Start of custom calculations & formulas DailyPivot = (YesterdaysHigh+YesterdaysLow+YesterdaysClose)/3; DailyMedian = (YesterdaysHigh+YesterdaysLow)/2; DailyPivotHigh = DailyPivot + abs(DailyPivot - DailyMedian); DailyPivotLow = DailyPivot - abs(DailyPivot - DailyMedian); R1 = ((2 * DailyPivot) - YesterdaysLow); S1 = ((2 * DailyPivot) - YesterdaysHigh); R2 = ((DailyPivot - S1) + R1); S2 = (DailyPivot - (R1 - S1)); R3 = (R2 + (YesterdaysHigh - YesterdaysLow)); S3 = (S2 - (YesterdaysHigh - YesterdaysLow)); Plot(R1,"",colorCustom11,styleLine); Plot(S1,"",colorCustom11,styleLine); Plot(R2,"",colorCustom12,styleLine); Plot(S2,"",colorCustom12,styleLine); Plot(R3,"",colorCustom13,styleLine); Plot(S3,"",colorCustom13,styleLine); Plot(DailyPivot,"",colorYellow,styleLine); Plot(C,Name(),colorBlack,styleCandle); On Sun, Sep 7, 2008 at 6:50 PM, tradinghumble <[EMAIL PROTECTED]> wrote: > Hi, just wondering if anyone here came accross an AFL that will plot > labels for price pivots. Thanks. > > >
