Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 22:02:21 +0000



Post From: Moving Average Simple with SCDateTime input

[2015-07-26 22:04:31]
User53601 - Posts: 105
I have the following studies in the Graph :

1.)  Bar Time Duration

2.)  Moving Average Simple
- Input data is subgraph from BarTimeDuration study – DURATION, which is a SCDateTime type

So far I got the moving average from Bar Time duration.

Now I wanted to get this subgraph to my ACSIL study. However, I have some problem, I get zero values only.


Here I imported the Bar Time Duration Average
sc.GetStudyArrayUsingID(3,0,BarTimeDurationAverage);

Then I wanted to get the value from BarTimeDurationAverage array.

I am not sure what is the type of output Subgraph AVG in the Moving Average Simple,
whether it is SCDateTime or float type or something else.

That is why, I tried these two ways how to get the Moving average values, however, both ways give me zero values:

as INT variable: TIME_PART(BarTimeDurationAverage[sc.Index]
as FLOAT variable: BarTimeDurationAverage[sc.Index]

can you help with this, thank you