Announcement

Collapse
No announcement yet.

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....

          Comment


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

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by cmoran13, 04-16-2026, 01:02 PM
            0 responses
            43 views
            0 likes
            Last Post cmoran13  
            Started by PaulMohn, 04-10-2026, 11:11 AM
            0 responses
            25 views
            0 likes
            Last Post PaulMohn  
            Started by CarlTrading, 03-31-2026, 09:41 PM
            1 response
            163 views
            1 like
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 04-01-2026, 02:41 AM
            0 responses
            98 views
            1 like
            Last Post CarlTrading  
            Started by CaptainJack, 03-31-2026, 11:44 PM
            0 responses
            158 views
            2 likes
            Last Post CaptainJack  
            Working...
            X