I am using UNMANAGED orders, and really all I need is Ninja to send them for execution.
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Wait until flat before executing live
Collapse
X
-
BTW ... If I use an opening Stop order in MarketReplay on a Sunday afternoon, the order gets rejected after the following message: "Market Replay Connection, There is no market data available to drive the simulation engine. affected Order: Buy Stop @ 94.19".
On top of that, the strategy does not get notified that the order is Rejected.
Comment
-
Hi Dominique,
Because the market replay is running over sunday I would expect this behavior.
The Market Replay may be running but there also needs to have been recorded trades during the time you are placing orders.
If you are receiving active bid / ask information the order should place with the Market Replay.
So that I may test this on my end, which instrument (+expiry), and exactly what time did you place this order?
I look forward to your reply.Chelsea B.NinjaTrader Customer Service
Comment
-
Hello Dominique,
Thank you for that information.
I was not able to download that day of replay data to test as the data is no longer available.
However, I am fairly certain this is the cause. During playback, if you select this instrument in the Control Center does it show that you are receiving updated Bid/Ask information?Chelsea B.NinjaTrader Customer Service
Comment
-
Hi Chelsea,
I "cheated" by changing the Sunday session open to 6:15pm ... in that case, the strategy starts and submits the orders for execution before the 6:15pm session open, which is enough for me to validate that behavior at this stage (I will have all the week-end to test it against my IB live account).
After quite a bit of rework of my own code, I have reached a point where my strategy can be stopped then restarted, and it restarts from exactly the same position & open-orders, regardless of any update of historical data in the interval. It then checks what its position should be, given the current historical data, vs what the position was prior to restart, and adjusts that position accordingly.
I also found the answer to my own question which started this thread. A strategy can decide of its own start mode, "WaitUntilFlat" or "ImmediatelySubmitOrders", independently of the global setting in Options / Strategy / NinjaScript ... In Initialize(), use :
StrategySync = NinjaTrader.Strategy.StrategySync.SubmitImmediatel y;
or
StrategySync = NinjaTrader.Strategy.StrategySync.WaitUntilFlat;
Cheers
Dominique
Comment
-
Hello Dominique,
It looks like you are on the right path, and that is very interesting about how you are developing your strategy.
Also, thank you for letting me know about the StrategySync. I will let Bertrand know you have found the answer to this question.
Please let me know if I can be of any further assistance.Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by casabella, Today, 04:12 AM
|
0 responses
5 views
0 likes
|
Last Post
by casabella
Today, 04:12 AM
|
||
Started by Ludwik, Today, 03:52 AM
|
0 responses
6 views
0 likes
|
Last Post
by Ludwik
Today, 03:52 AM
|
||
Started by wuannetraam, Today, 02:40 AM
|
0 responses
10 views
0 likes
|
Last Post
by wuannetraam
Today, 02:40 AM
|
||
Started by cyberpete76, 03-27-2023, 12:29 AM
|
7 responses
271 views
1 like
|
Last Post
by slightly
Today, 01:47 AM
|
||
Started by renewsaltwater, Today, 01:15 AM
|
0 responses
4 views
0 likes
|
Last Post Today, 01:15 AM |
Comment