EnterLongLimit(DefaultQuantity,(Swing(5),SwingHigh[0] + 0.5),"").
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Swing Indicator as an Entry
Collapse
X
-
Swing Indicator as an Entry
Hi. Please help me as I know there are several things I must be missing here? Does anyone have experience using the swing indicator as an entry price? I have completed a strategy that I like but currently I'm just entering at market because I can't figure out how to set a limited order using the previous swing hi for longs or swing lo for shorts? In this example I'm trying to use the swing high and add on 2 ticks (.50) to that price as an entry. What am I missing or something have wrong? thanks
EnterLongLimit(DefaultQuantity,(Swing(5),SwingHigh[0] + 0.5),""). -
Sorry for any confusion-The second image is from NT8 showing what I thought i was doing. Using the previous swing low as a limit order (-) .50 or 2 ticks. And the first image is actually from tradingview which shows the previous swing low price at 4542.75 in red and 2 ticks below that being 4542.25. I would like something that would allow me to price that entry, if possible?
Last edited by Smithwob; 08-06-2023, 09:06 AM.
Comment
-
Hello Smithwob,
Enable TraceOrders and add prints to understand the behavior.
Print the time of the bar and print Swing(5),SwingHigh[0] + 0.5 along with a label, then also print the Price -> Ask.
Below is a link to a forum post on using prints to understand behavior. Please watch the video 'Debugging using prints with the Strategy Builder'.
Include the output saved to a text file with your next post.
Note, the Swing indicator changes it's values historically, which makes this a very complex indicator to use. The swing may not have formed while a bar is open, but then on a later bar the swing for that previous bar may be updated. This means that it may be necessary to unlock the script and code by hand, to get the swing high / low from the previous bar when the last swing occurred.
Below are links to forum posts that discuss.
Hi - I trying to develop a strategy that needs to read the previous 2-3 swing high/low values in Swing indicator. It seems like the indicator itself doesn't memorize previous values. Would you please provide any adivce on how this can be done? Thank you!
Hello, I'm using the Swing indicator in my strategy and I'm having trouble finding information on how to access previous highs and lows. For example, using Swing(5).SwingHigh[0] will give me the most recent Swing High with a strength of 5, but I would like to know where the last x number of highs were so I can plot higherChelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
558 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
324 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
546 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
547 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|
Comment