is there any possibility to working TP/SL intermittently (it was set currency , ex:60$)?
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
TP/SL is not working often
Collapse
X
-
Hello bosajin,
Thanks for your post.
If you are calling SetProfitTarget/SetStopLoss in OnBarUpdate, the methods must be called when the strategy is flat, before the entry order is submitted. Please follow the example below when doing so.
SamplePriceModification - https://ninjatrader.com/support/help...of_stop_lo.htm
If the Currency that is used for the order results in an order level that is less than one tick from the average entry price, this can result in an invalid order submission that would be ignored.
If you increase the Currency value used, do you see this behavior?
When you test with TraceOrders enabled, do you see any feedback for the stop/target submission?
TraceOrders - https://ninjatrader.com/support/help...aceorders2.htm
I look forward to assisting.JimNinjaTrader Customer Service
-
This answer makes no sense. You say "If you are calling SetProfitTarget/SetStopLoss in OnBarUpdate, the methods must be called when the strategy is flat, before the entry order is submitted. Please follow the example below when doing so." Then you give a link to a documentation page with an example. In that example, it calls SetStopLoss in two places, one place where we are flat and the other where we are in a LONG position. The fact that the example calls SetStopLoss when in a long position contradicts the statement that the methods must be called when flat.
Can someone at NT support please clarify this and state explicitly when and how you must call SetStopLoss and SetTakeProfit when submitting an order? The vast majority of us want to do this at the time the order is submitted, and we want the freedom to set these dynamically. The documentation on this is very sketchy. Please clarify.
Comment
-
Hello westofpluto,
Set methods prep NinjaTrader to submit target and stop loss order when an associated entry order is seen as filled. They should be submitted before the associated entry method is submitted.
You can call Set methods when the strategy is in a long position to move the stop loss or profit target, but if the Set method is not called before the associated entry order, then NinjaTrader will submit target/stop to the last level that was set when the Set method was called. This can mean that when your entry order fills, the target and stop are submitted to previous levels which may be invalid. The order submission for the target/stop can then be ignored or rejected.
Therefore, it is suggested to reset your target/stop to initial levels when the strategy is flat, before the next entry is made. Or if you are scaling in to an existing position, to ensure that the Set methods associated with the new entry are called before that entry method is called.JimNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Javierw.ok, Today, 04:12 PM
|
0 responses
4 views
0 likes
|
Last Post
by Javierw.ok
Today, 04:12 PM
|
||
Started by timmbbo, Today, 08:59 AM
|
2 responses
10 views
0 likes
|
Last Post
by bltdavid
Today, 04:10 PM
|
||
Started by alifarahani, Today, 09:40 AM
|
6 responses
40 views
0 likes
|
Last Post
by alifarahani
Today, 03:18 PM
|
||
Started by Waxavi, Today, 02:10 AM
|
1 response
18 views
0 likes
|
Last Post Today, 03:03 PM | ||
Started by Kaledus, Today, 01:29 PM
|
5 responses
15 views
0 likes
|
Last Post Today, 02:56 PM |
Comment