Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How if a bar's range covers both stop loss price and target profit price?
Collapse
X
-
How if a bar's range covers both stop loss price and target profit price?
If I use both SetStopLoss and SetProfitTarget in my NinjaScript strategy and run backtesting, what is the rule for NT's backtesting engine to determine at which price the trade happens when a bar's range covers both prices?Tags: None
-
Originally posted by NinjaTrader_AdamP View Postbourbonnais,
It depends on which order it hits them, so its dependent on higher-scale information. In other words, whatever the price hits first is executed first.
Please let me know if I may assist further.
So, if I use 1-minute historical data, when new bar covers both prices (target price and stop loss price), without knowing which price is hit first based on 1-minute data, NT will try to load tick data and determine which one is hit first? Is this what you mean?
For example, I run backtest using 1-minute data, and I have a target price $101 and stop loss price $99 and a new 1-minute bar has high $102 and low $98.
Comment
-
bourbonnais,
Apologies, I misunderstood your question.
Essentially the fill price of an order has an algorithm that can be set, and you are only allowed to run strategies on the close of bars in backtesting. So any input price will be the close. If the close is at or below the stop it will trigger the stop price. If the close is at or above the profit target, it will trigger the profit target.
Here is more information : http://www.ninjatrader.com/support/h...ime_vs_bac.htmAdam P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Aviram Y, Today, 05:29 AM
|
0 responses
2 views
0 likes
|
Last Post
by Aviram Y
Today, 05:29 AM
|
||
Started by quantismo, 04-17-2024, 05:13 PM
|
3 responses
25 views
0 likes
|
Last Post Today, 05:23 AM | ||
Started by ScottWalsh, 04-16-2024, 04:29 PM
|
7 responses
34 views
0 likes
|
Last Post Today, 05:15 AM | ||
Started by cls71, Today, 04:45 AM
|
0 responses
6 views
0 likes
|
Last Post
by cls71
Today, 04:45 AM
|
||
Started by mjairg, 07-20-2023, 11:57 PM
|
3 responses
217 views
1 like
|
Last Post
by PaulMohn
Today, 04:22 AM
|
Comment