Result Property
Summary
Gets the resulting time series of the Weighted Moving Average indicator calculation.
Signature
| 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: March 30, 2023