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!
See more
See less

Partner 728x90

Collapse

Swing Indicator as an Entry

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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),"").​

    #2
    patterns, candles , price have to be considered. Usually the chart or the swing will help to elaborate your question above.

    Comment


      #3
      Click image for larger version  Name:	Nt#2.jpg Views:	0 Size:	77.6 KB ID:	1263279 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?
      Attached Files
      Last edited by Smithwob; 08-06-2023, 09:06 AM.

      Comment


        #4
        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 higher
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Haiasi, 04-25-2024, 06:53 PM
        2 responses
        16 views
        0 likes
        Last Post Massinisa  
        Started by Creamers, Today, 05:32 AM
        0 responses
        5 views
        0 likes
        Last Post Creamers  
        Started by Segwin, 05-07-2018, 02:15 PM
        12 responses
        1,786 views
        0 likes
        Last Post Leafcutter  
        Started by poplagelu, Today, 05:00 AM
        0 responses
        3 views
        0 likes
        Last Post poplagelu  
        Started by fx.practic, 10-15-2013, 12:53 AM
        5 responses
        5,407 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Working...
        X