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
Using ATR period/ATR multiplier for entries
Collapse
X
-
Using ATR period/ATR multiplier for entries
Hello, the indicator I use plots the ATR with a period of 10 and multiplier of 4 as a dotted line on the chart (image attached). Using this, if the price reaches within 2 ticks to this level, it gives a signal for a breakout. My question is, how would I be able to create a strategy that trails an entry 2 ticks above this level at all times? So the entry moves slightly above the atr with period of 10 and multiplier of 4. That way if the price ever reaches the level of 2 ticks above the atr line, a long entry would be made. I have tried with the signal plots of this indicator but this is not what i want. Thank you! Most use the atr as a stop but I want to use it as an entry for pullbacks. Also I am using the strategy builder if this can be done on thatTags: None
-
I also know of the ATR trailing indicator on the ecosystem (https://ninjatraderecosystem.com/use...d/atrtrailing/) so how could I use this for trailing an entry above the atr line?
-
Hello Brandon9821,
Thank you for your post.
Please see the attached example script that demonstrates placing a trailing entry order 2 ticks above the ATRTrailing indicator's Upper plot.
In the example script, we create a bool variable (initially set to true) and a TrailPrice variable to hold our trailing limit price. Then, we check if the bool is true and assign a value to our TrailPrice variable and call EnterLongLimit() using the TrailPrice variable as the Limit price and we also set the bool to false. Next, we check if the current Close[0] is greater than the previous Close[1] and reassign a value to our TrailPrice variable. After that, we check if we are in a flat position and call EnterLongLimit() again to trail the limit order.
See the help guide documentation for more information about using the Strategy Builder.
Strategy Builder - https://ninjatrader.com/support/help...gy_builder.htm
Let us know if we may assist further.Attached FilesBrandon H.NinjaTrader Customer Service
Comment
-
Thank you very much for your help! When the strategy is enabled I don’t see any historical entries. I have specified my target and stop losses in ticks but this didn’t seem to help. Do I have to have any other condition or set anything else up? Also I know you setup the above file for the upper plot so that’s not why I’m seeing a trailing stop right now but if the strategy is setup to take a trade 2 ticks above the ATR then historical orders should show. Thank you!
Comment
-
Hello Brandon9821,
Thank you for your note.
The strategy example I provided included a check to see if the State is Realtime (State = State.Realtime) before placing trades. Since we wait for State = State.Realtime before trades are placed, no historical orders would be placed.
Does your strategy include a State = State.Realtime condition? If so, you would need to remove this condition from your strategy to see historical orders placed.
Please let us know if we may assist further.,Brandon H.NinjaTrader Customer Service
Comment
-
Hello You4Life,
Thanks for your note.
Unfortunately, I am not aware of an indicator named ATR period or ATR multiplier.
We do have the ATRTrailing indicator mentioned in post #2.
That said, this forum thread will be open for other community members to share their knowledge of an ATR period or ATR multiplier indicator.
Let us know if we may assist further.Brandon H.NinjaTrader Customer Service
- Likes 1
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by kujista, Today, 05:44 AM
|
0 responses
5 views
0 likes
|
Last Post
by kujista
Today, 05:44 AM
|
||
Started by ZenCortexCLICK, Today, 04:58 AM
|
0 responses
5 views
0 likes
|
Last Post Today, 04:58 AM | ||
Started by sidlercom80, 10-28-2023, 08:49 AM
|
172 responses
2,281 views
0 likes
|
Last Post
by sidlercom80
Today, 04:40 AM
|
||
Started by Irukandji, Yesterday, 02:53 AM
|
2 responses
18 views
0 likes
|
Last Post
by Irukandji
Today, 03:55 AM
|
||
Started by adeelshahzad, Today, 03:54 AM
|
0 responses
8 views
0 likes
|
Last Post
by adeelshahzad
Today, 03:54 AM
|
Comment