This feature is not available in NT8
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
enabling Strategy on strategy page
Collapse
X
-
Hello richbois,
Sorry, I am not sure if I understand. You can enable automated strategies in the Control Center-->Strategies in NinjaTrader 8. Your screenshot shows the Strategies-tab with a strategy enabled.
Can you please test the SampleMACrossOver strategy on the Sim101 account. Once you checked the Enabled box, please check if you see the strategy is enabled in the Control Center-->Log-tab.JasonNinjaTrader Customer Service
-
ok what i was trying to say is when i start NT8 then connect to data supplier then go to Strategy page to enable the strategy i was not able to enable it there
now i added your Sample Crossover to the chart and restarted NT8. I was able to enable it from the Strategy page but not my own created strategy. The error message on the output window is
Error on calling 'OnStateChange' method: The calling thread cannot access this object because a different thread owns it.
so I guess there is something wrong in my script
Thank you for your help
Comment
-
Hello richbois,
Thanks for your reply.
To verify, when you are connected to the market, please go to the strategies tab in the control center and right mouse click in the strategy tab, next in the context menu select "new Strategy", then in the strategies tab select the strategy SampleMACrossover, select the instrument to apply to at the top then click OK, at that point can you click the enable check box in the strategies tab. Does it enable? Do you see any error messages in this process?
If the above process works without errors on the sampleMaCrossover strategy, please remove your strategy from any charts (to isolate), and repeat the above process but this time with your strategy. Does it enable? Do you see any error messages?
For reference, here is a link to the strategies tab helpguide: http://ninjatrader.com/support/helpG...tegies_tab.htmPaul H.NinjaTrader Customer Service
Comment
-
yes Paul all is good with SampleMAcrossover
I only get this error after boot up with my strategy not your sample.
There must be something in my script that cause this error
this is the part that is referred to in the error
#region OnStateChange
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
Description = @"OilHawk system";
Name = "OilHawk";
Calculate = Calculate.OnEachTick;
IsOverlay = true;
ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right;
EntriesPerDirection = 1;
EntryHandling = EntryHandling.AllEntries;
IsExitOnSessionCloseStrategy = true;
ExitOnSessionCloseSeconds = 60;
IsFillLimitOnTouch = true;
MaximumBarsLookBack = MaximumBarsLookBack.Infinite;
OrderFillResolution = OrderFillResolution.Standard;
Slippage = 0;
StartBehavior = StartBehavior.WaitUntilFlat;
TimeInForce = TimeInForce.Day;
TraceOrders = false;
RealtimeErrorHandling = RealtimeErrorHandling.StopCancelClose;
StopTargetHandling = StopTargetHandling.PerEntryExecution;
BarsRequiredToTrade = 20;
}
else if (State == State.Configure)
{
}
else if (State == State.Historical)
{
//Call Our AddToolBarButton Method - Latching Bool used to Assure this is Executed Only Once!
if(!IsToolBarButtonAdded) AddToolBarButton();
}
else if (State == State.Terminated)
{
//Call Our DisposeMyStuff Method - and Dispose of Anything Needing Disposed of on Termination
DisposeMyStuff();
}
}
#endregion
any ideas
again thanks in advance
PS once enable manually then i can disable and enable in the Strategy tab
Comment
-
Hello richbois,
Thanks for your reply and clarity.
To debug you could add Print statements in each state to see how far you are getting. For debugging purposes you could also comment out the toolbar statement, then the dispose statement to try an isolate the issue.Paul H.NinjaTrader Customer Service
Comment
-
you are correct the toolbar is the issue
// else if (State == State.Historical)
// {
// //Call Our AddToolBarButton Method - Latching Bool used to Assure this is Executed Only Once!
// if(!IsToolBarButtonAdded) AddToolBarButton();
// }
can you see what is wrong with it
Comment
-
Hello richbois,
Thanks for your reply.
At this level would be impossible to say. If you like you can send in your complete strategy and we can test here. If that is of interest, send to Platformsupport[at]Ninjatrader[dot]com with Atten: Paul && enabling Strategy on strategy page. If you send it in, please do include the step by step process you used to generate the error.Paul H.NinjaTrader Customer Service
Comment
-
this is a very similar strategy that gives me the same issue
This was developed on this thread
I also include the script for it
step by step
Insert Buttons on chart
Close NT8
Start NT8
Connect
goto strategy page and try to enable it should not
However if you go to chart and enable chart manually then it will enable]
then you can go to Strategy page and disable enable no problem
so the issue is when you start NT and go to Strategy page to enableAttached FilesLast edited by richbois; 10-29-2015, 02:14 PM.
Comment
-
To resolve please see my modifications attached. The reason this is occurring is sense the strategy is owned by the chart when enabled on the chart, else when enabled on the control center it was owned by the control center.
We will look into normalizing the 'this.Dispatcher' to always be the dispatcher of the chart for next release if it is possible and prudent to do so.Attached Files
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by DJ888, Today, 10:57 PM
|
0 responses
1 view
0 likes
|
Last Post
by DJ888
Today, 10:57 PM
|
||
Started by MacDad, 02-25-2024, 11:48 PM
|
7 responses
158 views
0 likes
|
Last Post Today, 10:23 PM | ||
Started by Belfortbucks, Today, 09:29 PM
|
0 responses
7 views
0 likes
|
Last Post
by Belfortbucks
Today, 09:29 PM
|
||
Started by zstheorist, Today, 07:52 PM
|
0 responses
7 views
0 likes
|
Last Post
by zstheorist
Today, 07:52 PM
|
||
Started by pmachiraju, 11-01-2023, 04:46 AM
|
8 responses
151 views
0 likes
|
Last Post
by rehmans
Today, 06:44 PM
|
Comment