I have been able to run the "sample strategies" which come with NT on my charts. But I can't get anything I created to run on a chart.What am I missing??????? Please help anyone!
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Running a strategy in a chart?
Collapse
X
-
Running a strategy in a chart?
I've created a strategy and compiled it without any problems. I have run the strategy on Market Analyzer. Without any problems. But I haven't been able to get it to run on a chart.
I have been able to run the "sample strategies" which come with NT on my charts. But I can't get anything I created to run on a chart.What am I missing??????? Please help anyone!Last edited by MikeS; 02-11-2023, 08:47 PM.Tags: None
-
Hello MikeS,
Thanks for your post.
What color does the strategy appear as in the Strategies tab of the Control Center when you enable it on the chart (green or yellow)?
Do you see any error messages appear in the Log tab of the Control Center when enabling it on a chart? If so, what exactly do they report?
Running a strategy on a chart: https://ninjatrader.com/support/help...t_strategy.htm
I look forward to assisting further.<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
-
ANOTHER UPDATE: I've enabled the strategy I designed on numerous charts. Under the Strategies tab in the Control Panel, some were YELLOW and had a 1 Long in the position column. And error messages in under the Log tab. Indicated the order had been rejected because the required number of bars had not been met. I Synchronize the virtual and SIM 101 accounts. I made sure the "Wait until Flat" box was unchecked. Then when I again enable the strategy in the Control panel, it shows a position. I've made sure any and all alerts which contain order entries were disabled.
What should I try next? Mike
Brandon H. I spoke too soon in my email to you. The color of my strategy in the control window after it is enabled is YELLOW. With no error messages. I enabled a NT's sample strategy. It was GREEN. Thanks for your help.
UPDATE TO THIS REPLY: It appears I may have got it working. Now under the Strategies tab of the Control Panel. The strategy I designed is GREEN when enabled. The NT's sample strategy is YELLOW when enabled.
I did get an error message in the LOG tab. It was highlighted in ORANGE. It stated the order was ignored because the required number of bars had not been met. The trade was marked on my chart.
WHAT DO THOSE COLORS MEAN? I didn't see any information on the web site about the meaning of the colors.
Is this normal operation?Last edited by MikeS; 02-13-2023, 08:29 AM.
Comment
-
Hello MikeS,
Thanks for your note.
" It stated the order was ignored because the required number of bars had not been met."
This is a warning message letting you know that the Bars Required to Trade property has not been met when the straetgy tried to place an order. By default, this property is set to 20, meaning 20 bars must be populated before the strategy can place an order successfully.
You could set the 'Bars required to trade' property to 0 in the Properties section of the Strategies window when adding the strategy to a chart to prevent this warning message from occurring.
See this help guide page about the meaning of a color in the Strategies tab of the Control Center: https://ninjatrader.com/support/help...standingTheStr ategiesTab
When a strategy is yellow (or orange on some monitors) in the Strategies tab of the Control Center, this means that the strategy entered a historical (theoretical) position in the historical data that has been loaded.
It also means that you have "Wait until flat" selected for the 'Start behavior' option in the strategy parameters.
This means that once the strategy has finished processing the historical data and has transitioned to real-time, it will wait until there is a real-time order submission that will cause the strategy to become flat. This also includes changing from a long position to a short position or vice versa as the position would pass through flat.
This also applies to secondary instruments if there are added series to the script. All positions must be flat before real-time orders will begin.
You can change the start behavior to "Immediately submit" in the parameters of the strategy. Immediately Submit automatically submits working orders from when the strategy processed historical data, and assumes the strategy position and account position are where you want it when you enable the strategy. This is typically used to have a strategy resume a position after disabling/enabling. If the strategy already had live orders running, the orders will resume with the new enablement of the strategy if they match the historically calculated orders. If the orders calculated from historical data do not match the live working orders, the live working orders will be cancelled and replaced by those calculated from historical data.
Sync Account Positions is an additional option that has NinjaTrader submit an order to sync the account position to the position calculated by the strategy. (Not the other way around.)
If you do not want the strategy to calculate a position from processing historical data. Add if (State == State.Historical) return; to the top of your strategy logic so historical processing is skipped. The strategy will then always start from a flat position because it has not calculated any orders.
See the help guide documentation below for more information.
Strategy vs. Account Position — https://ninjatrader.com/support/help..._account_p.htm
Start Behaviors — https://ninjatrader.com/support/help..._positions.htm
Additional information could be found in this forum thread - https://ninjatrader.com/support/foru...ion#post811541
Let us know if we may assist furtherLast edited by NinjaTrader_BrandonH; 02-13-2023, 08:33 AM.<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
71 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
43 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
25 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
28 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
56 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment