Run three concurrent strategies. Trading corn, soybeans, and wheat futures. Due to margin differences I would like a way to calculate against my excess margin. Were I to calculate against my account only one of the three strategies would try to take all the money for it's own purposes. And then the other two would error out due to "not enough funds to trade".
If it was based off of excessMargin though then corn would take the maxContractsCorn, say 5. Leave xxxxx funds left over. Then soybeans would take up to maxContractsSoybeans, say 3 or so. Then wheat would take as much margin as it could up to it's max. Leaving a buffer to ride out short term stop-losses. Also allowing the script to automatically start using more funds as they become available.
Edit: I guess also, is there a way to tell the script how much margin is per given contract. That way it can do
marginExcess/soybeansMargin = soybeansTraded;
soybeansTraded =< maxsoybeansTraded;
maxsoybeansTraded = 3;
Is this possible in NT scripting?
Thanks,
Rhy.
Comment