Gamestudio Links
Zorro Links
Newest Posts
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Trading Journey
by 7th_zorro. 04/27/24 04:42
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 770 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Tracking Price Series in Stock Rotation Strategy #487815
09/29/23 14:29
09/29/23 14:29
Joined: Apr 2019
Posts: 53
Canada
A
aelagha Offline OP
Junior Member
aelagha  Offline OP
Junior Member
A

Joined: Apr 2019
Posts: 53
Canada
Hi there,

I am working on a stock rotation strategy. In between rotations, I want to monitor the current price and make calculations on price history for the assets that have open trades. So, for every bar, I cycle trhough open_trades, and attempt to create a series, but Zorro erros out as I am switching and chaning the series between "run function" calls, e.g. Error 041.

One way is to create a sereis for each asset in the assetList (all_assets) rather than only for open trades. Is there a better / more efficient way since I have 100's of assets.

Thanks,
-Alaa

Re: Tracking Price Series in Stock Rotation Strategy [Re: aelagha] #487816
09/29/23 15:00
09/29/23 15:00
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
It is required that you have the same exact number of series() calls for every run() call so that Zorro can identify each individual series.

Now if you want to optimize it, you can specify a smaller series length. This would consume less memory.

I run a trading system with about 150-200 stock tickers, each with its own series(). It's not a problem because Zorro is quite fast.

Re: Tracking Price Series in Stock Rotation Strategy [Re: aelagha] #487817
09/30/23 02:47
09/30/23 02:47
Joined: Apr 2019
Posts: 53
Canada
A
aelagha Offline OP
Junior Member
aelagha  Offline OP
Junior Member
A

Joined: Apr 2019
Posts: 53
Canada
Thanks Andrew, and yes zorro is awesome. I really love it.

Re: Tracking Price Series in Stock Rotation Strategy [Re: aelagha] #487835
10/10/23 16:24
10/10/23 16:24
Joined: Oct 2023
Posts: 4
N
Nightmarek Offline
Guest
Nightmarek  Offline
Guest
N

Joined: Oct 2023
Posts: 4
You can take a look of my thread as an example, appreciate if you can share your thoughts as well as I am encountering an obstacle in ensuring the correct execution of rebalancing with that loop function


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1