Login Page - Create Account

Support Board


Date/Time: Sat, 15 Mar 2025 02:08:35 +0000



Post From: Moving avarage shows differently .

[2022-07-02 21:47:38]
bala - Posts: 74
I am using Sierra charts standard technical studies- 'Simple Moving avarage' for a period of 200 ( 16 tick chart) (ref: SierraChartStudies_64.scsf_MovingAverageSimple - this uses call 'sc.SimpleMovAvg(sc.BaseDataIn[Input_Data.GetInputDataIndex()], Subgraph_Avg, Input_Length.GetInt());').

I make a custom study using 'sc.MovingAverage(sc.BaseDataIn[Input_Data.GetInputDataIndex()], MV200,MOVAVGTYPE_SIMPLE, MVLR_Length.GetInt());'
The standard technical charts studies are very different on the screen compared to the custom study. I would expect them to be the same!

I experimented a standard 'Moving Average Crossover' with 200 and 10 ( SierraChartStudies_64.scsf_MovingAverageCrossover) - Now the MA for 200 is similar to mine.

Observation: ' sc.SimpleMovAvg(sc.BaseDataIn[Input_Data.GetInputDataIndex()], Subgraph_Avg, Input_Length.GetInt()); ' and 'sc.MovingAverage(sc.BaseDataIn[Input_Data.GetInputDataIndex()], Subgraph_Avg,MOVAVGTYPE_SIMPLE, Input_Length.GetInt());' produce very different results for 200 periods. ( they are close for period for 7)


Thanks