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

Range Bar Exit Price Markers

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

    Range Bar Exit Price Markers

    Hello, I am a beginner NT script developer. However, I did do one custom indicator a few months ago using the tutorials to get started.

    The indicators that I need now are to print predicted exit prices (2) for the current range bar in progress. It would be nice to print these prices in the right hand margin similar to the way price markers are printed for any of the standard indicators.

    The first indicator I call “SellLim” = Low[0] + RangeBarSize + TickSize.
    The second indicator I call “BuyLim” = High[0] – RangeBarSize – TickSize.

    I found a shared data variable for the TickSize, but could not find a shared data variable for the RangeBarSize. Is there a way to enter the RangeBarSize without hard coding it? Also, is there an existing method to print the variables; SellLim and BuyLim in the right hand margin?

    Any help would be appreciated.
    Thanks, Steve

    #2
    Hello,

    Thanks for your forum post.

    I would use the following to find the Range.



    BarsPeriod.Value

    Let me know if I can be of further assistance.

    Comment


      #3
      Hello Brett,

      Your idea worked very well as expected. My indicators are doing exactly what I needed.
      Thanks, Steve

      Comment


        #4
        Code to chew on.

        Thought maybe this code might be helpful.

        RangBarTargetsv7.cs

        PricePanelv7.cs

        Click image for larger version

Name:	panel.png
Views:	1
Size:	46.7 KB
ID:	860364

        Comment


          #5
          Thank you "ThatManFromTexas",

          I will chew on your code. It is much more elaborate than what I did. I just printed the exit prices in the right hand margin. Simple, but it is all I need for now. However, I will definitely learn from your code.

          Thanks again, Steve

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by llanqui, Today, 03:53 AM
          0 responses
          6 views
          0 likes
          Last Post llanqui
          by llanqui
           
          Started by burtoninlondon, Today, 12:38 AM
          0 responses
          10 views
          0 likes
          Last Post burtoninlondon  
          Started by AaronKoRn, Yesterday, 09:49 PM
          0 responses
          15 views
          0 likes
          Last Post AaronKoRn  
          Started by carnitron, Yesterday, 08:42 PM
          0 responses
          11 views
          0 likes
          Last Post carnitron  
          Started by strategist007, Yesterday, 07:51 PM
          0 responses
          14 views
          0 likes
          Last Post strategist007  
          Working...
          X