Thank you.
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
Buy and Sell Stops
Collapse
X
-
Buy and Sell Stops
Is it possible to place buy and sell stops on a bar instead of straight buy or sell? For example if close > open of bar X then place a buy stop above its high and a sell stop below its low. And keep this condition open for X bars down the road. When one is hit the other becomes the stop. And then can add a profit target or trail.
Thank you.Tags: None
-
Hello Trader17,
Thanks for your post.
Yes, there are entry methods that use stopmarket or stoplimit orders, these can be done in the managed approach and unmanaged approach however depending on the mode used they are done differently between the two approaches, please review the helpguide here: http://ninjatrader.com/support/helpG...er_methods.htm
In the managed approach you would not be able to place a bracket type order on the same bar. Please see the managed approach Internal Order Handling Rules that Reduce Unwanted Positions in this section: http://ninjatrader.com/support/helpG...d_approach.htm What you could do, in the managed approach, is create your code to monitor price movement and place the appropriate order, ie if price goes above the high of the previous bar enter long (either with a straight market order or a stopmarket or stoplimit at some level above that. Opposite if the price goes below the low of the previous bar.
In the unmanaged approach there are no protective rules and you may place orders as you wish however your code would be responsible for all error handling and order management aspects.
You can read about the managed approach here: http://ninjatrader.com/support/helpG...d_approach.htm
You can read about the unmanaged approach here: http://ninjatrader.com/support/helpG...d_approach.htmPaul H.NinjaTrader Customer Service
-
Hello Trader17,
Thanks for your post.
Yes, the profit and target can be OCO tied if in the managed approach you use the SetProfitTarget and SetStopLoss methods.
In the managed approach, by default, entry orders not filled at the end of the bar are automatically canceled. These are the type orders submitted by the strategy builder. To submit more advanced orders that are not automatically canceled you would need to code directly in Ninjascript using with the managed or unmanaged approach.
Please see the links in my previous post for details of the unmanaged and managed approach.Paul H.NinjaTrader Customer Service
Comment
-
Thank you. I am sorry. I was not clear. I meant OCO as in a buy stop and sell stop order placed by the strategy. When one entry order is filled the other is cancelled out and managed by profit/loss specified in strategy. Can such entries be set up in the Wizard and be open on more than one bar or it is custom coding at that point?
Thanks Paul.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by mgco4you, Today, 09:46 PM
|
1 response
2 views
0 likes
|
Last Post Today, 09:56 PM | ||
Started by wzgy0920, Today, 09:53 PM
|
0 responses
3 views
0 likes
|
Last Post
by wzgy0920
Today, 09:53 PM
|
||
Started by Rapine Heihei, Today, 08:19 PM
|
1 response
8 views
0 likes
|
Last Post Today, 08:30 PM | ||
Started by Rapine Heihei, Today, 08:25 PM
|
0 responses
6 views
0 likes
|
Last Post Today, 08:25 PM | ||
Started by f.saeidi, Today, 08:01 PM
|
1 response
9 views
0 likes
|
Last Post Today, 08:17 PM |
Comment