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

SMA outside BBs indie?

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

    SMA outside BBs indie?

    I was hoping someone could help me build an indie that put up a simple visual alert when a 50sma travels outside the upper/lower bands of a 1.9/20 period Bollinger?

    It seems like it should be quite simple, but already my coding skills are failing me... I can see how I might do it as a Strategy, but not as a simple indie.

    Any ideas greatly appreciated.

    #2
    Hi 5iver, hopefully this can get you started:
    Code:
    if (SMA(50)[0] > Bollinger(1.9, 20).Upper[0])
        DrawArrowDown("down arrow" + CurrentBar, false, 0, High[0] + TickSize, Color.Red);
    else if (SMA(50)[0] < Bollinger(1.9, 20).Lower[0])
        DrawArrowUp("up arrow" + CurrentBar, false, 0, Low[0] - TickSize, Color.Green);
    AustinNinjaTrader Customer Service

    Comment


      #3
      Very kind and very speedy Austin, thanks.

      I'll have a go at making this into a functioning indie. My coding skills are at the sub-neanderthal level... but I'll have an honest crack at it. Thanks again.

      Comment


        #4
        OK, I can't make it work, I'm such a dunce.
        Last edited by 5iver; 10-08-2009, 05:52 PM.

        Comment


          #5
          It maybe easier doing this in the Strategy Wizard and then 'unlocking' the code to port it over to an indicator, this way the conditions are setup to work out of the box....
          BertrandNinjaTrader Customer Service

          Comment


            #6
            Didn't know that was an option. Thanks :-)

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Skifree, Yesterday, 11:47 PM
            0 responses
            2 views
            0 likes
            Last Post Skifree
            by Skifree
             
            Started by Skifree, Yesterday, 11:41 PM
            0 responses
            4 views
            0 likes
            Last Post Skifree
            by Skifree
             
            Started by Skifree, Yesterday, 11:38 PM
            0 responses
            1 view
            0 likes
            Last Post Skifree
            by Skifree
             
            Started by KonAdams, Yesterday, 10:53 PM
            0 responses
            6 views
            0 likes
            Last Post KonAdams  
            Started by JGriff5646, Yesterday, 10:02 PM
            0 responses
            12 views
            0 likes
            Last Post JGriff5646  
            Working...
            X