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

Modified Swing

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

    Modified Swing

    I want to create a modified NT7 Swing indicator that uses an oscillator indicator as its Input Series, and only plot swing highs when >0 and swing lows when <0. I tried to modify the code, but I am not sufficiently knowledgeable to make it work perfectly.

    Can someone provide the lines(s) of code and where to place it(them)?

    #2
    Hello ScorpioTravis,

    Thank you for the post.

    While I wouldn't be able to provide the specific syntax for this concept based on your description, I can try to provide help materials or samples of concepts you may be having difficulties with. Can you detail where you got stuck while working on this?

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      I know what syntax to use, but I can't determine where (line) to insert it to prevent swing high <0 and swing low >0. My modified code works correctly in except in a few instances.

      Comment


        #4
        Hello ScorpioTravis,

        Thank you for your reply.

        With the provided details, I am unsure if it would be possible to say what you need to change in your custom script to prevent that specifically. This would also be difficult to say what line may need to be changed if you have added or subtracted from the script, the line numbers would no longer match the existing script to be able to say something goes on a certain line.

        This is an item that you would likely need to provide more specific details about the changes you have made and what specific problems you are unable to overcome. You noted a few instances the code you made does not work correctly, this would be a good starting point for your question in contrast to what you have added.

        Would you be able to provide detail on what you changed, and what the specific case is that you see it not working? Very likely a path toward a solution is to use Prints in the script at this location to find what part of the logic is not happening as you expect it to.

        The swing indicator is fairly complex in how it works, so if you are trying to prevent its default logic in some way, you would likely need to first review and "walk" through the logic to find how it is setting the data you want to omit. There are plots which are used to render data in this script, and series which are used to store data. This script also has some functions near the bottom that contain loops to find the swings when requested so depending on which part of the script you want to remove will likely require some research as removing that part or changing it may affect how the overall script works.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          "The swing indicator is fairly complex in how it works"

          Yes, and therein is my issue. :>) At this point it's not worth the work, I can live with what I have.

          Thank you for your time!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by alifarahani, Today, 09:40 AM
          6 responses
          31 views
          0 likes
          Last Post alifarahani  
          Started by Waxavi, Today, 02:10 AM
          1 response
          17 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by Kaledus, Today, 01:29 PM
          5 responses
          13 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by Waxavi, Today, 02:00 AM
          1 response
          12 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by gentlebenthebear, Today, 01:30 AM
          3 responses
          17 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X