2 registered members (AndrewAMD, 7th_zorro),
1,285
guests, and 4
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Portfolio Trading
[Re: MatPed]
#470407
01/12/18 12:47
01/12/18 12:47
|
Joined: Jul 2017
Posts: 785
Zheka
OP
User
|
OP
User
Joined: Jul 2017
Posts: 785
|
JCL, To size positions in a portfolio of algos (which implement equity curve trading), I first wanted to poll all algos for their On/Off status and then re-allocate capital/size accordingly. With this I hit several problems: 1) You can have many asset/algo loops, but only 2 nested, and the number of assets and algos must not change between loops. I found that 2 Algo (only) loops do not work: the program just doesnt get into the second one (printf from the second loop does not print anything) 2) Alternatively, I tried to have one algo loop working in phantom mode to generate trades, and then change TradeLots of just opened trades in a for(open_trades) loop. Did not work because TradeLots appears to be read-only. How can I achieve what I need? Thanks a lot in advance for your advice.
|
|
|
Re: Portfolio Trading
[Re: Zheka]
#470488
01/17/18 13:10
01/17/18 13:10
|
Joined: Jul 2017
Posts: 785
Zheka
OP
User
|
OP
User
Joined: Jul 2017
Posts: 785
|
|
|
|
Re: Portfolio Trading
[Re: jcl]
#470495
01/17/18 15:25
01/17/18 15:25
|
Joined: Jul 2017
Posts: 785
Zheka
OP
User
|
OP
User
Joined: Jul 2017
Posts: 785
|
when you do not trade, they are flat.So will be their MA (I hope) An MA will continue changing,irrespective of the MA type. And after MA-length bars with no trades will be equal to Balance. The correct mechanism requires creating/maintaining a separate array of equity@trade, not equity@bar. And I thought this might be an enhancement to implement in one of the future versions.
|
|
|
|