I have been trying to understand how to use ELCollections or Global Variables to exchange data from 2 different trading systems, but I haven't been able to figure it out yet..
A helping hand would be greatly appreciated.
I post here simplified version of what I'd need.
Let's say I have 2 Systems working on 2 different charts in the same workspace: TS1 and TS2 and I want to read a value in TS1 and pass it in TS2.
TS1:
Code: Select all
//TS1
var: MyVarSent(0);
Buy next bar at market;
setexitonclose;
MyVarSent=netprofit;
Code: Select all
//TS2
var: MyVarRecieved(0), MyShares(0);
{"MyVarRecieved" should be the same value of "MyVarSent" in TS1 }
MyShares = round(MyVarRecieved*0.01,0);
Buy MyShares shares next bar at market;
setexitonclose;
1- Is it possible to make it work something like this in backtesting mode and in live strategy mode?
2- If yes, could someone (more skilled than me ) please attach the missing part of the code or give me some step by step instructions on how to make it?
3- If no, would you have some alternative suggestion on how to reach my goal?
Many thanks for your help!