Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trend depicted as BG color indie?

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

    Trend depicted as BG color indie?

    Hi,

    I'd like to try and write an indie that changes the color of my price chart background based on the state of the current trend, as defined by predetermined sequences of high and low pivots.

    I was hoping to establish five levels of trend:

    ("low" and "high" refer to a 5-candle Pivot)

    low followed by high followed by higher low = light green

    low followed by high followed by higher low followed by higher high= darker green

    high followed by low followed by lower high = light red

    high followed by low followed by lower high followed by lower low= darker red

    any other sequence = gray

    Is this something that would be possible in Ninja?
    Are there problems of logic?
    Would a start point have to be defined?


    I've attached an image that might make my rambling clearer...

    Many thanks in advance for any help.
    Attached Files

    #2
    5iver,

    It is a matter of programming the logic you want. To change the background color you just want to do this:
    Code:
    BackColor = Color.Green;
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks Josh, but is this something a fool like me could attempt in the wizard, or is that too much to expect?

      Comment


        #4
        The Strategy Wizard generates strategies. You will need to play with code to create custom indicators.

        A simple example could be something like this:
        The current high being greater than the previous low
        Code:
        if (High[0] > Low[1])
             BackColor = Color.Red;
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Thanks Josh, I'll give it a go and post the result if it works...

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          599 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          345 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          558 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          558 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X