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 sjsj2732, Yesterday, 04:31 AM
            0 responses
            39 views
            0 likes
            Last Post sjsj2732  
            Started by NullPointStrategies, 03-13-2026, 05:17 AM
            0 responses
            290 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            289 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            135 views
            1 like
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            96 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Working...
            X