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
Strategy Builder: Add ATR-value as TakeProfit and StopLoss
Collapse
X
-
Cool, I'll keep hammering at this for a while more, and send a more assembled strat to you as I get frustrated by the obstructions.
-
Daryl do you have this doped out yet?? I looked at the strat you posted. I'm sure you realize that the ATR 14 is a number much smaller than the price of the commodity you are trading. I think that what you are after is the current price plus or minus the ATR. I would be interested in trading some ideas on using the Strategy builder as material available is limited and the narrator of the webinar will only address very superficial questions.
I am also interested in trying to move the stop.
Dean
Comment
-
If you are wondering how to implement an ATR trailing stop in the strategy builder, you need some kind of ATR trailing stop indicator. There are dozens available for free.
What I do, is create the condition (the example is for a long entry):
If Close[0] < TrailingStopIndicator[1]
Then ExitLong.....etc. etc.
If I am confused about the question being asked here, then ignore me.Last edited by liquid150; 12-29-2017, 09:47 AM.
Comment
-
If the question is setting a profit target to an ATR, say, the daily ATR, then I asked this question over here and it was satisfactorily answered:
Note: I don't think you can take a multiple of the ATR without unlocking code to input the maths involved.
Comment
-
continuing quest
okaaaaaaayyyyy .... I think I have it working now using the Framework of the mycustomstrategy2 strategy illustrated below I simply created a pair of variables named TSValueLong and TSValueShort, as doubles valued at 0. Then carried them forward attached to the two plots of the Volatility Stop indicator I think I picked up over at Futures.io .
My question now is, it's kinda nerve wracking not knowing exactly where that trailing stop actually us while it's live. How do I have it's location displayed on either the chart or the super DOM or both so I can see how it is moving in a live trade while I'm walking forward my various entry and exit signal techniques? Is that done when I set the variable in set one? Is it done in the stops and targets window? I know it's done with the drawing tab, and obviously I'd tag it with "currentbar" But is there anything else I'm not smart enough to ask a question about that I should include?
What, for example, is the difference between simulated and regular stop orders? I'm thinking one is hidden from the market so institutional traders don't know where it is, which one is that? What are the things missing here, that I should know?
I'm including the indicator, in case anyone wants to try this out for themselves or needs it to test what I've described by including this indicator's values, instead of a fixed number in the mycustomstrategy2 strategy noted earlier in this same thread.Attached Files
Comment
-
Originally posted by Daryl Haaland View Postokaaaaaaayyyyy .... I think I have it working now using the Framework of the mycustomstrategy2 strategy illustrated below I simply created a pair of variables named TSValueLong and TSValueShort, as doubles valued at 0. Then carried them forward attached to the two plots of the Volatility Stop indicator I think I picked up over at Futures.io .
My question now is, it's kinda nerve wracking not knowing exactly where that trailing stop actually us while it's live. How do I have it's location displayed on either the chart or the super DOM or both so I can see how it is moving in a live trade while I'm walking forward my various entry and exit signal techniques? Is that done when I set the variable in set one? Is it done in the stops and targets window? I know it's done with the drawing tab, and obviously I'd tag it with "currentbar" But is there anything else I'm not smart enough to ask a question about that I should include?
What, for example, is the difference between simulated and regular stop orders? I'm thinking one is hidden from the market so institutional traders don't know where it is, which one is that? What are the things missing here, that I should know?
I'm including the indicator, in case anyone wants to try this out for themselves or needs it to test what I've described by including this indicator's values, instead of a fixed number in the mycustomstrategy2 strategy noted earlier in this same thread.
Are you using code or the strategy builder? In the latter case you need to click the box to show the indicator when building your conditions. The former case requires paint script and AddIndicator.
Simulated stops are the ones held on the ninjatrader server and not delivered to the broker.
I don't really use the DOM.
Edit: Using an Indicator as a trailing stop will not show anything in the Stops and Targets windows because you are not using that feature as a stop. The value will show in the data box, however.Last edited by liquid150; 01-10-2018, 10:02 AM.
Comment
-
Originally posted by liquid150 View PostI coded my strategy to paint the indicator on the chart, and when I run the strategy I apply it on a chart. You need to have all relevant time frames on your chart for the strategy to function on the chart. I have all indicators used in the strategy painted, so I can see everything in real time.
Are you using code or the strategy builder? In the latter case you need to click the box to show the indicator when building your conditions. The former case requires paint script and AddIndicator.
Simulated stops are the ones held on the ninjatrader server and not delivered to the broker.
I don't really use the DOM.
Edit: Using an Indicator as a trailing stop will not show anything in the Stops and Targets windows because you are not using that feature as a stop. The value will show in the data box, however.
I chewed on the initial problem enough that it finally got working, I'll do some more experimentation with a simplified strategy so I can continue seeing how the trailing stop technique is working today. Basically walk forward with lots of entries and trailstop exits just to run it through it's paces. Then I'll add a structured exit later and more refined entry rules, as I figure out how this aspect of the code works.
Comment
-
Thanks by the way for the reminder /heads up about which stop is which. Simulated stops then, are the ones hidden from the market
Originally posted by liquid150 View PostI coded my strategy to paint the indicator on the chart, and when I run the strategy I apply it on a chart. You need to have all relevant time frames on your chart for the strategy to function on the chart. I have all indicators used in the strategy painted, so I can see everything in real time.
Are you using code or the strategy builder? In the latter case you need to click the box to show the indicator when building your conditions. The former case requires paint script and AddIndicator.
Simulated stops are the ones held on the ninjatrader server and not delivered to the broker.
I don't really use the DOM.
Edit: Using an Indicator as a trailing stop will not show anything in the Stops and Targets windows because you are not using that feature as a stop. The value will show in the data box, however.
Comment
-
Hello Daryl Haaland,
If you’re running your strategy on live data, opening a superdom for that instrument or chart trader should show your working orders, even if that stop is a simulated stop, which will be displayed in yellow rather than pink. (See screen shot)
If you check your log tab, are you getting an error? You could also post your log/trace files along with the time you enabled the strategy.
To correct what Liquid150 said, simulated stops are not held on NinjaTraders server, they are held on your local PC. This is important because if you’re computer goes down this stop is not sent. Furthermore to say simulated stops are hidden from institutional traders would imply non simulated stops submitted to the exchange are exposed to these traders, which is absolutely not correct.
I look forward to your reply.Alan P.NinjaTrader Customer Service
Comment
-
drawing trailstop position dynamically
will this work? under conditions and actions create an additional drawing action upon entering long or short. in the case of a long position have a triangle up, with the Y coordinates being based on Strategy, average position price, who's property values are drawn from Volatility stop indicator's lower band offset by one tick so the arrow is actually pointing to the exact line where the sop should take place? everything set to ticks rather than arithmetic. or should this be done another way? (edited for spelling corrections due to typing with mitts on.)Last edited by Daryl Haaland; 01-10-2018, 12:53 PM.
Comment
-
Originally posted by Daryl Haaland View Postwill this work? under conditions and actions crate an additional drawing action upon entering long or short. in the case of a long position have a triangle up, with nthe Y coordinates being based on Strategy, average position price, who's property values are drawn from Volatility stop indicator's lower band offset by one tick so the arrow is actually pointing to the exact line where the sop should take place? everything set to ticks rather than arithmetic. or should this be done another way?
Comment
-
First thank you for the clarification concerning simulated stops. And as for the yellow displayed stops: Do I need to have chart trader turned on for that, because my charts aren't showing it that way? Maybe I've got my chart settings all screwy, it's certainly possible. While waiting for your replies (I know I'm chatty) I'll be poking around in this things brain with a marline spike to see what makes it kick, swear suddenly, or spontaneously write a check. (there's an image)
Originally posted by NinjaTrader_AlanP View PostHello Daryl Haaland,
If you’re running your strategy on live data, opening a superdom for that instrument or chart trader should show your working orders, even if that stop is a simulated stop, which will be displayed in yellow rather than pink. (See screen shot)
If you check your log tab, are you getting an error? You could also post your log/trace files along with the time you enabled the strategy.
To correct what Liquid150 said, simulated stops are not held on NinjaTraders server, they are held on your local PC. This is important because if you’re computer goes down this stop is not sent. Furthermore to say simulated stops are hidden from institutional traders would imply non simulated stops submitted to the exchange are exposed to these traders, which is absolutely not correct.
I look forward to your reply.
Comment
-
Hello Daryl Haaland,
Yes, chart trader needs to be enabled to see working orders.
You could also pull up the orders tab on the Control Center and will see stops working.
From a risk management standpoint, simulated stops could be considered a very bad idea.
Please let us know if you need further assistance.Alan P.NinjaTrader Customer Service
Comment
-
What aspects would mitigate that risk? a DSL connection and your personal broker's phone number on speed dial?
Thank you lots for the clarification of chart trading activation. I normally don't have it active and instead had been entering trades through the DOM but for this I'll change a couple of my habits.
Originally posted by NinjaTrader_AlanP View PostHello Daryl Haaland,
Yes, chart trader needs to be enabled to see working orders.
You could also pull up the orders tab on the Control Center and will see stops working.
From a risk management standpoint, simulated stops could be considered a very bad idea.
Please let us know if you need further assistance.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by llanqui, Yesterday, 09:59 AM
|
2 responses
15 views
0 likes
|
Last Post
by llanqui
Today, 04:00 AM
|
||
Started by ThoriSten, Today, 03:56 AM
|
0 responses
2 views
0 likes
|
Last Post
by ThoriSten
Today, 03:56 AM
|
||
Started by PhillT, 04-19-2024, 02:16 PM
|
3 responses
18 views
0 likes
|
Last Post
by mangel2000
Today, 03:04 AM
|
||
Started by TraderBCL, Today, 02:37 AM
|
0 responses
1 view
0 likes
|
Last Post
by TraderBCL
Today, 02:37 AM
|
||
Started by mangel2000, Today, 02:23 AM
|
0 responses
9 views
0 likes
|
Last Post
by mangel2000
Today, 02:23 AM
|
Comment