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

Drawing Verticle Lines on MACD Crosses...Multiple Instances

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

    Drawing Verticle Lines on MACD Crosses...Multiple Instances

    So I used strategy builder to draw a line on the chart panel when the MACD crosses and stays above or below the smoothing for a certain number of bars. It works, but it only paints the most recent instance...be it a cross up or down, doesn't matter. Of course I want it to paint all instances for the data loaded and run live time. What am I missing in the strategy builder to make this happen? I am sure this is a common request but I couldn't find it in search. Thanks ;-)

    #2
    Hello 90bideven, thanks for your post.

    You will need to give a unique tag to the line to generate a new line for each instance. You can append the CurrentBar value to the tag to do this, then you will get a unique tag every time.

    Please let me know if I can assist any further.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Thanks Chris. So I changed Set 1 and Set 2 tag names to "tag1" and "tag2" and that picks up the most recent up and down turn respectively and rolls them going forward. That is great for real time trading, but if I have 10 days of data loaded and wanted every instance marked, what would I have to name the tags? Thanks.

      Comment


        #4
        Hello 90bideven,

        Thanks for your reply.

        Chris meant that you should change the tag name of the drawing object itself (the vertical line) to include the current bar number.

        Here is a short video that walks through this: https://paul-ninjatrader.tinytake.co...MF8xMTMwNTc0MA

        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Perfect, thanks. that is exactly what I needed to see!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by chbruno, Today, 04:10 PM
          0 responses
          3 views
          0 likes
          Last Post chbruno
          by chbruno
           
          Started by josh18955, 03-25-2023, 11:16 AM
          6 responses
          436 views
          0 likes
          Last Post Delerium  
          Started by FAQtrader, Today, 03:35 PM
          0 responses
          6 views
          0 likes
          Last Post FAQtrader  
          Started by rocketman7, Today, 09:41 AM
          5 responses
          19 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by frslvr, 04-11-2024, 07:26 AM
          9 responses
          127 views
          1 like
          Last Post caryc123  
          Working...
          X