israel tel aviv
Posts: 7 since Jan 2015
Thanks Given: 8
Thanks Received: 1
|
Hello everyone,
I have this issue where my orders are colliding each other (I need to separate my long entry so it won't be used as an exit for my short but as a new entry), therefore I was thinking to use sub accounts.
I was wondering if anyone could help me understand how can I launch a strategy under a sub account.
I have this ninjascript code where you can see that I launch my strategy under my existing account, but I need to enter the sub account information.
MyStrategy childStrategy= new MyStrategy ();
childStrategy.Account = Account;
Period minutePeriod = new Period(PeriodType.Minute,1,MarketDataType.Last);
childStrategy.SetBarsPeriodInstrument(minutePeriod,Position.Instrument);
Strategies.Add(childStrategy);
if (!childStrategy.Enabled)
{
childStrategy.Enabled = true;
}
the line marked in red is the line where i want to replace - instead of using "Account" object i want to use something like "Sub Account".
Thanks!
|