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

want a help to build an indicator

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

    want a help to build an indicator

    hello every body, I were having an indicator at TradingView’s which is Rexdog indicator
    I get the code from trading view and here is it:


    // Simple average used for bias in any market on any timeframe. Its purpose is to provide the overall momentum bias you should have when trading an instrument. It works across all markets and all timeframes.
    // © xkavalis

    //@version=4
    study(title="RexDog Average", shorttitle="RDAVG", overlay=true)

    atr_range_offset=input(3, title="ATR Range Offset")

    src = close

    sma_200 = sma(src, 200)
    sma_100 = sma(src,100)
    sma_50 = sma(src,50)
    sma_24 = sma(src,24)
    sma_9 = sma(src,9)
    sma_5 = sma(src, 5)
    sma_avg = (sma_200 + sma_100 + sma_50 + sma_24 + sma_9 + sma_5 ) / 6

    cus_line_width = 2
    plot(sma_avg, title="SMA Avg", color=color.yellow, linewidth=cus_line_width)


    It’s very simple thing but I think i need a lot of time to learn how to build something at ninjatrader
    if anybody can help me I will appreciate that

    #2
    Hello jack121,

    Thanks for your post and welcome to the NinjaTrader forums!

    What you have would be a simple indicator to create.

    NinjaTrader uses Ninjascript to create indicators, strategies, etc. Ninjascript is based on C# so having some familiarity with C# syntax would be helpful and there are plenty of online resources to learn C#.

    The Help guide has a sequential list of tutorials for creating your own indicators and there is one that relates to creating your own SMA so I would suggest going through the tutorials in order and you will soon find yourself creating what you need: https://ninjatrader.com/support/help...indicators.htm


    Paul H.NinjaTrader Customer Service

    Comment


      #3
      any help

      Comment


        #4
        Hello jack121,

        Thanks for your reply.

        I've posted a link in post #2 to a tutorial that is similar to your needs.

        We can leave this thread open for any forum member to create this for you.

        Alternatively, if you would like we can provide a link to 3rd party programmers in the NinjaTrader Ecosystem.

        Paul H.NinjaTrader Customer Service

        Comment


          #5
          jack121 Here you go. Not sure what "atr_range_offset" is, but don't think it is used?
          Attached Files

          Comment


            #6
            00Cedge thanks a lot it works and it's very good even without the atr.
            the atr is: average true range, it's the same as the rexdog indicator but with 2 lines one above and one below.
            thanks again

            Comment


              #7
              Originally posted by jack121 View Post
              00Cedge thanks a lot it works and it's very good even without the atr.
              the atr is: average true range, it's the same as the rexdog indicator but with 2 lines one above and one below.
              thanks again
              Yip, just that the ATR variable wasn't being used in the code sample. I've added the bands.
              Think of me when your indi makes you millions
              Cheers
              Attached Files

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Johnny Santiago, Today, 03:11 AM
              1 response
              3 views
              0 likes
              Last Post NinjaTrader_Jason  
              Started by pjsmith, Today, 12:44 AM
              2 responses
              17 views
              0 likes
              Last Post pjsmith
              by pjsmith
               
              Started by Liquidfusion, Yesterday, 10:51 PM
              3 responses
              44 views
              0 likes
              Last Post Liquidfusion  
              Started by jjanguda, Yesterday, 10:57 PM
              1 response
              33 views
              0 likes
              Last Post NinjaTrader_ChrisSch  
              Started by fscabrera03, Yesterday, 04:58 PM
              0 responses
              58 views
              0 likes
              Last Post fscabrera03  
              Working...
              X