Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (EternallyCurious, howardR), 646 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Filtering series data? #487063
01/07/23 22:16
01/07/23 22:16
Joined: Dec 2022
Posts: 6
G
Gheo Offline OP
Newbie
Gheo  Offline OP
Newbie
G

Joined: Dec 2022
Posts: 6
I want to select specific data points from OpenPrice series and use only those data points to make a Moving average plot line.

The distance between those data points is variable and I am not sure if I implement it as array it will stick the MA plot line in the right place.

I tried to store the filtered data points on a series but I either get:

A 000000 B 00000000000 C 000
Or
AAAAABBBBCCCCCCC

which doesn't help with drawing at all.

Last bar function confuse repetitive values order and the repetitiveness is variable so no point to tell it a fixed iteration.

If there is a way to ignore 0 values for ploting kr calculations of functions without ignoring the original index of the data points that would be great.

Kinda like if A[i]!=0 then SMA(A[i]) else do nothing

When i do conditions like that the SMA line is broken and if i store it's past values it creates straight lines.

All i need is to filter out zeros from series when i want to use functions or indicators.

Any advice?

Attached Files smaBrokenPlotLine.png
Last edited by Gheo; 01/07/23 22:23.
Re: Filtering series data? [Re: Gheo] #487067
01/08/23 08:00
01/08/23 08:00
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
I think the simplest way is TimeFrame. If you want only every 10th price, set TimeFrame = 10 before creating the series.

Re: Filtering series data? [Re: Spirit] #487081
01/11/23 19:57
01/11/23 19:57
Joined: Dec 2022
Posts: 6
G
Gheo Offline OP
Newbie
Gheo  Offline OP
Newbie
G

Joined: Dec 2022
Posts: 6
Thank you.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1