Skip to content

Result Property

Summary

Gets the resulting time series of the Weighted Moving Average indicator calculation.

Signature

1
public abstract IndicatorDataSeries Result {get;}

Return Value

IndicatorDataSeries

Declaring Type

cAlgo.API.Indicators.WeightedMovingAverage

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
 private WeightedMovingAverage _weightedMovingAverage;
 protected override void OnStart()
 {
     _weightedMovingAverage = Indicators.WeightedMovingAverage(Source, Period);
 }
 protected override void OnTick()
 {
     if(Trade.IsExecuting)
         return;
     int index = MarketSeries.Close.Count - 1;
     if(Symbol.Bid > _weightedMovingAverage.Result[index])
     {
         Trade.CreateMarketOrder(TradeType.Buy, Symbol, Volume);
     }
  }

Last update: July 1, 2022

Comments