Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Entering at Median Price
Collapse
X
-
Entering at Median Price
In Strategy Builder I am attempting to enter a medial price instead of bid, ask or close but even though the strategy is a simple crossover of two average, it skips 90%of orders. Is there a way to fix this ? Also I am entering using limit ordersTags: None
-
Hello Teebone21,
Thanks for your question.
It sounds like you are submitting the limit order when there is a crossover, but the order is getting cancelled on the next bar. The Strategy Builder will generate Managed Approach code that requires limit/stop market/stop limit order methods to be called again with each bar update to keep the order alive.
You could consider using a boolean variable (created in Inputs and Variables) that you can set to true when the cross occurs, and then another condition that checks if the bool is true, and if it is, submit your limit order. You can then create another logical condition that will set this bool back to false when you do not want this order to be submitted.
We look forward to assisting.
-
thanks I will tryOriginally posted by NinjaTrader_Jim View PostHello Teebone21,
Thanks for your question.
It sounds like you are submitting the limit order when there is a crossover, but the order is getting cancelled on the next bar. The Strategy Builder will generate Managed Approach code that requires limit/stop market/stop limit order methods to be called again with each bar update to keep the order alive.
You could consider using a boolean variable (created in Inputs and Variables) that you can set to true when the cross occurs, and then another condition that checks if the bool is true, and if it is, submit your limit order. You can then create another logical condition that will set this bool back to false when you do not want this order to be submitted.
We look forward to assisting.
Comment
-
would it be possible for you to send me a quick video of how to accomplish this. I am still fairly newOriginally posted by NinjaTrader_Jim View PostHello Teebone21,
Thanks for your question.
It sounds like you are submitting the limit order when there is a crossover, but the order is getting cancelled on the next bar. The Strategy Builder will generate Managed Approach code that requires limit/stop market/stop limit order methods to be called again with each bar update to keep the order alive.
You could consider using a boolean variable (created in Inputs and Variables) that you can set to true when the cross occurs, and then another condition that checks if the bool is true, and if it is, submit your limit order. You can then create another logical condition that will set this bool back to false when you do not want this order to be submitted.
We look forward to assisting.
Comment
-
Hello Teebone21,
I have included a demonstration for creating a bool and using it to control when a limit order should be submitted.
Demo - https://drive.google.com/file/d/1-3P...w?usp=drivesdk
If you have not seen our educational resources on the Strategy Builder, please see below.
Strategy Builder 301 — https://www.youtube.com/watch?v=_KQF2Sv27oE
Conditions examples —https://ninjatrader.com/support/help...on_builder.htm
Actions examples — https://ninjatrader.com/support/help...us/actions.htm
We look forward to assisting.
Comment
-
Thank you for your assistance Jim. I forgot to add I need to Make Heiken Ashi the primary data series. Is this possible in strategy builder or do i have to unlock code ?Originally posted by NinjaTrader_Jim View PostHello Teebone21,
I have included a demonstration for creating a bool and using it to control when a limit order should be submitted.
Demo - https://drive.google.com/file/d/1-3P...w?usp=drivesdk
If you have not seen our educational resources on the Strategy Builder, please see below.
Strategy Builder 301 — https://www.youtube.com/watch?v=_KQF2Sv27oE
Conditions examples —https://ninjatrader.com/support/help...on_builder.htm
Actions examples — https://ninjatrader.com/support/help...us/actions.htm
We look forward to assisting.
Comment
-
Hello Teebone21,
The primary data series is the data series we apply the script to. No additional changes would be necessary to have the strategy run on Heiken Ashi bars other than setting the data series to Heiken Ashi when you are setting up the strategy.
Note that with historical backtesting, the OHLC values of the next bar are used to simulate order fills. Heiken Ashi bars create fake values, so this can make backtesting results skewed. Also with the BarsType, the developing values with realtime data are rounded and recirculated in the BarsType's calculation.
When using Heiken Ashi in a strategy, I suggest using an indicator instead of the BarsType.
NinjaTrader 8 natively provides Heiken Ashi as a bar type for most common bar types (minute, tick, volume, second, day, week, month, year). This Heiken Ashi indicator is provided for the Range, Renko and any custom bar types that may be added. The indicator performs in the same manner as the NinjaTrader 7 version. 4-27-18 […]
The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
We look forward to assisting.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
50 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
126 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
69 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|

Comment