Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Paint Bar

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

    Paint Bar

    i have 2 indicators that paint bars when conditions are met.

    trying to have indicator #1 look to see if indicator #2 has been triggered within the last 5 bars before painting bar.

    #2
    more info

    indicator #1 has the following once conditions are met
    Code:
    [SIZE=2][FONT=Courier New]Purple_Short.Set([/FONT][/SIZE][FONT=Courier New][SIZE=2][COLOR=#800080].75[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]); [/SIZE][/FONT]
    trying to add indicator #1 to indicator #2
    Code:
    && Purple_Short.[FONT=Courier New][SIZE=2][COLOR=#008000][COLOR=black]MAX(High,5)[0]== .75[/COLOR][/COLOR][/SIZE][/FONT]
    trying to see if indicator #1 has been triggered within the last 5 bars.

    if indicator #1 has been triggered within the last 5 bars...and of course all the conditions on indicator #2 have been met...then a bar will be painted

    i know how to paint bars and add plots, but can't seem to combine these two

    Comment


      #3
      && MAX(Purple_Short,5)[0]== .75

      was hoping this would work, but seems to be missing something..it does compile, but wont paint any bars

      Comment


        #4
        Hello,

        I am sorry, you will need to debug it. I do not know why this is happening.
        DenNinjaTrader Customer Service

        Comment


          #5
          this may work

          this seems to work. it's the complete title or name of indicator as opposed to just the "Set" deal
          Code:
          [SIZE=2][FONT=Courier New][FONT=Courier New][SIZE=2]&& MAX(Bar_Purple_Long_and_Short_Bool_Test_v1([/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]30[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2], [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]30[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2], [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]30[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2], [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]2.618[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2], [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]18[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2], [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]2[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2], [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]63500[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2], [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]125500[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]).Purple_Short,[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]5[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2])[[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]]== [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080].75
          [/COLOR][/SIZE][/FONT][FONT=Courier New][/FONT][/FONT][/SIZE]

          Comment


            #6
            I have found that it is always best to use a dataSeries for this. It makes life a lot easier.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by cmoran13, Yesterday, 01:02 PM
            0 responses
            29 views
            0 likes
            Last Post cmoran13  
            Started by PaulMohn, 04-10-2026, 11:11 AM
            0 responses
            21 views
            0 likes
            Last Post PaulMohn  
            Started by CarlTrading, 03-31-2026, 09:41 PM
            1 response
            160 views
            1 like
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 04-01-2026, 02:41 AM
            0 responses
            95 views
            1 like
            Last Post CarlTrading  
            Started by CaptainJack, 03-31-2026, 11:44 PM
            0 responses
            148 views
            2 likes
            Last Post CaptainJack  
            Working...
            X