Chicago, IL
Experience: Intermediate
Platform: NinjaTrader
Broker: AGN/Rithmic
Trading: CL
Posts: 22 since Apr 2010
Thanks Given: 14
Thanks Received: 2
|
Hey, NT7 programming gurus...
Say I have a strategy running on a 5 min chart, and different one running on a 2 min chart. The 5 min strategy fired off a long entry 90 seconds ago, and that trade is still going. The 2 min chart strategy just went long, too. Now I have two trades going. Generally this would be a good thing, considering the two timeframes agreed, but I do not want to risk more than my standard two contracts at one time, no matter what the setup.
How can I modify the code in my strategies to abort an entry if there is already a live position? Like "if position_already == false then <trade>"?
If this is a duh-obvious question, I do apologize, but I haven't found any answers that really apply.
Thanks in advance,
Gary
|