// Initialization

        public PriceActionSwingClass(NinjaScriptBase owner, DrawingProperties drawingProperties, CalculationTypeList calculationType,
                                     double strength, bool useHighLow, bool showPoints, bool showLines)
        {
            this.owner                 = owner;
            this.drawingProperties     = drawingProperties;
            tickCalculation            = new TickCalculation(owner, this);
            swingForwardCalculation    = new SwingForwardCalculation(owner, this);
            swingForwardCalculationOld = new SwingForwardCalculationOld(owner, this);

            CalculationType = calculationType;
            Strength        = strength;
            UseHighLow      = useHighLow;
            ShowPoints      = showPoints;
            ShowLines       = showLines;
        }
Пример #2
0
        // Initialization

        public DowTheoryClass(NinjaScriptBase owner, DrawingProperties drawingProperties, CalculationTypeListDowTheory calculationTypeListDT,
                              CalculationTypeList calculationTypeListPCW, double strength, bool useHighLow, bool showPoints, bool showLines,
                              double maxPercentOfPivotRetraction, double minPercentOfPivotRetraction)
        {
            this.owner             = owner;
            this.drawingProperties = drawingProperties;
            CalculationType        = calculationTypeListDT;

            priceActionSwingClass = new PriceActionSwingClass(owner, drawingProperties, calculationTypeListPCW, strength,
                                                              useHighLow, showPoints, showLines);
            trendCalculation = new TrendCalculation(owner);
            pivotCalculation = new PivotCalculation(owner, maxPercentOfPivotRetraction, minPercentOfPivotRetraction);

            /*
             * if (!ShowLog)
             * {
             *  logPrinter.SetIndicatorAsInvisible(owner);
             * }
             */
        }
Пример #3
0
 public Indicators.JiraiyaIndicators.PriceActionSwingIndicator PriceActionSwingIndicator(ISeries <double> input, CalculationTypeList calculationType, double strength, bool useHighLow)
 {
     return(indicator.PriceActionSwingIndicator(input, calculationType, strength, useHighLow));
 }
Пример #4
0
 public JiraiyaIndicators.PriceActionSwingIndicator PriceActionSwingIndicator(ISeries <double> input, CalculationTypeList calculationType, double strength, bool useHighLow)
 {
     if (cachePriceActionSwingIndicator != null)
     {
         for (int idx = 0; idx < cachePriceActionSwingIndicator.Length; idx++)
         {
             if (cachePriceActionSwingIndicator[idx] != null && cachePriceActionSwingIndicator[idx].CalculationType == calculationType && cachePriceActionSwingIndicator[idx].Strength == strength && cachePriceActionSwingIndicator[idx].UseHighLow == useHighLow && cachePriceActionSwingIndicator[idx].EqualsInput(input))
             {
                 return(cachePriceActionSwingIndicator[idx]);
             }
         }
     }
     return(CacheIndicator <JiraiyaIndicators.PriceActionSwingIndicator>(new JiraiyaIndicators.PriceActionSwingIndicator()
     {
         CalculationType = calculationType, Strength = strength, UseHighLow = useHighLow
     }, input, ref cachePriceActionSwingIndicator));
 }
Пример #5
0
 public JiraiyaIndicators.PriceActionSwingIndicator PriceActionSwingIndicator(CalculationTypeList calculationType, double strength, bool useHighLow)
 {
     return(PriceActionSwingIndicator(Input, calculationType, strength, useHighLow));
 }
Пример #6
0
 public Indicators.JiraiyaIndicators.DowTheoryIndicator DowTheoryIndicator(ISeries <double> input, CalculationTypeListDowTheory calculationTypeDT, CalculationTypeList calculationTypePCW, double strength, bool useHighLow, double maxPercentOfPivotRetraction, double minPercentOfPivotRetraction)
 {
     return(indicator.DowTheoryIndicator(input, calculationTypeDT, calculationTypePCW, strength, useHighLow, maxPercentOfPivotRetraction, minPercentOfPivotRetraction));
 }
Пример #7
0
 public JiraiyaIndicators.DowTheoryIndicator DowTheoryIndicator(ISeries <double> input, CalculationTypeListDowTheory calculationTypeDT, CalculationTypeList calculationTypePCW, double strength, bool useHighLow, double maxPercentOfPivotRetraction, double minPercentOfPivotRetraction)
 {
     if (cacheDowTheoryIndicator != null)
     {
         for (int idx = 0; idx < cacheDowTheoryIndicator.Length; idx++)
         {
             if (cacheDowTheoryIndicator[idx] != null && cacheDowTheoryIndicator[idx].CalculationTypeDT == calculationTypeDT && cacheDowTheoryIndicator[idx].CalculationTypePCW == calculationTypePCW && cacheDowTheoryIndicator[idx].Strength == strength && cacheDowTheoryIndicator[idx].UseHighLow == useHighLow && cacheDowTheoryIndicator[idx].MaxPercentOfPivotRetraction == maxPercentOfPivotRetraction && cacheDowTheoryIndicator[idx].MinPercentOfPivotRetraction == minPercentOfPivotRetraction && cacheDowTheoryIndicator[idx].EqualsInput(input))
             {
                 return(cacheDowTheoryIndicator[idx]);
             }
         }
     }
     return(CacheIndicator <JiraiyaIndicators.DowTheoryIndicator>(new JiraiyaIndicators.DowTheoryIndicator()
     {
         CalculationTypeDT = calculationTypeDT, CalculationTypePCW = calculationTypePCW, Strength = strength, UseHighLow = useHighLow, MaxPercentOfPivotRetraction = maxPercentOfPivotRetraction, MinPercentOfPivotRetraction = minPercentOfPivotRetraction
     }, input, ref cacheDowTheoryIndicator));
 }