EnterLongLimit(DefaultQuantity,(Swing(5),SwingHigh[0] + 0.5),"").
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
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 fx.practic, 10-15-2013, 12:53 AM
|
5 responses
5,403 views
0 likes
|
Last Post
by Bidder
Today, 12:22 AM
|
||
Started by Shai Samuel, 07-02-2022, 02:46 PM
|
4 responses
94 views
0 likes
|
Last Post
by Bidder
Today, 12:11 AM
|
||
Started by DJ888, Yesterday, 10:57 PM
|
0 responses
6 views
0 likes
|
Last Post
by DJ888
Yesterday, 10:57 PM
|
||
Started by MacDad, 02-25-2024, 11:48 PM
|
7 responses
158 views
0 likes
|
Last Post Yesterday, 10:23 PM | ||
Started by Belfortbucks, Yesterday, 09:29 PM
|
0 responses
8 views
0 likes
|
Last Post
by Belfortbucks
Yesterday, 09:29 PM
|
Comment