If I apply two strategies to one chart and Strategy #1 is CalculateOnBarClose true and triggers a long entry which is filled, and Strategy #2 is CalculateOnBarClose false and says that at 1:59 PM to ExitLong and ExitShort, would #2 close a position in process that has not reached profit trigger or stop loss?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Exit Position Seconds Before Bar Close
Collapse
X
-
Sorry--I misstated. It should read:
If I apply two strategies to one chart and Strategy #1 is CalculateOnBarClose true and triggers a long entry which is filled, and Strategy #2 is CalculateOnBarClose false and says that at 1:59 PM to ExitLong and ExitShort, would #2 close a position in process that has not reached profit trigger or stop loss?
-
Is there a command I can enter through NinjaScript that represents "Flatten Everything?" Also, do the NinjaScript commands execute in the order in which I entered them; in other words, if my NinjaScript is set up to execute CalculateOnBarClose = true and I write first "Flatten Everything" or "Exit Long Position" and "Exit Short Position" and then write "Enter Long" and Enter Short," will the Flatten Everything or Exit Long and Exit Short execute first and then allow immediate execution of Enter Long and Enter Short?
Comment
-
No, strategy 2 can ONLY control things from strategy 2. There is nothing that will cross over to strategy 1. Everything is processed in the sequence received. Actual filling of orders is up to your brokerage and may not be in the same sequence you submitted them at.Josh P.NinjaTrader Customer Service
Comment
-
Yes, as those two strategies are independent from each other - all you have to do is ensure is the synching for your overall strategy position vs your real account position - http://www.ninjatrader-support.com/H...tPosition.html
Comment
-
I've reviewed the link instructions but am a bit confused. Let me give an example of what I want to do.
Let's say I have two Strategies ("A" and "B") running simultaneously on the same instrument on the same chart. Strategy A says if the current bar closes at 1.310 then enter a buy stop limit order at 1.325. Strategy B says if the bar closes at 1.310 enter a sell stop limit order at 1.300. I want both orders entered at the close of the current bar. During the next bar, the buy stop limit order of Strategy A may or may not be filled and the sell stop limit order of Strategy B also may or may not be filled. They may both be filled and be in process at the same time. Let's say they are in process at the same time and Strategy A reaches the target written into the strategy and, therefore, closes the buy position. Strategy B needs to continue until it reaches its target and closes its sell position.
Will this work?
Comment
-
Apply a single strategy to multiple charts simultaneously?
I've read the FAQ page and see no instructions about beginning a new thread so I'm piggy-backing on something I inquired about earlier this year.
Can I apply the same strategy to multiple charts at once? In other words, if I have three charts on the screen, each with a different instrument, and I want to run the same strategy on all three charts, is there a way to do that through a single command or must I always apply the strategy to each chart one at a time?
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
649 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
370 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
109 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
574 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
576 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment