public void NewSupportResistanceLine(int barNoStart, int barNoEnd, SupportResistanceType snrType, double snrPrice) { BarNoStart = barNoStart; BarNoEnd = barNoEnd; SnRType = snrType; SnRPrice = snrPrice; }
public double GetNBarsHLOffset(SupportResistanceType srt, double price) { double offset = 0; switch (srt) { case SupportResistanceType.Support: offset = price - LowestN[1]; break; case SupportResistanceType.Resistance: offset = HighestN[1] - price; break; } return(offset); }
public double GetEmaOffset(SupportResistanceType srt, double price) { double offset = 0; switch (srt) { case SupportResistanceType.Support: offset = price - Value[1] - GetPriceByTicks(OffsetTicks); break; case SupportResistanceType.Resistance: offset = Value[1] + GetPriceByTicks(OffsetTicks) - price; break; } return(offset); }
public double GetLastDayHLOffset(SupportResistanceType srt, double price) { double offset = 0; switch (srt) { case SupportResistanceType.Support: offset = price - LastDaySpt[1]; break; case SupportResistanceType.Resistance: offset = LastDayRst[1] - price; break; } return(offset); }
public double GetVwapOpenDOffset(SupportResistanceType srt, double price) { double offset = 0; double openD = CurrentDayOHL().CurrentOpen[0]; switch (srt) { case SupportResistanceType.Support: offset = price - Math.Min(PlotVWAP[1], openD); break; case SupportResistanceType.Resistance: offset = Math.Max(PlotVWAP[1], openD) - price; break; } return(offset); }
public void NewSupportResistanceLine(Period period, SupportResistanceType snrType, double snrPrice) { LinePeriod = period; SnRType = snrType; SnRPrice = snrPrice; }
public void NewSupportResistanceBar(int barNo, SupportResistanceType snrType, PriceSubtype snrPriceType) { BarNo = barNo; SnRType = snrType; SnRPriceType = snrPriceType; }