Login Page - Create Account

Support Board


Date/Time: Sun, 22 Dec 2024 05:15:04 +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