Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple conditions for colouring

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

    Multiple conditions for colouring

    Hi,I wonder if someone can point me in the right direction with this?
    I have set up a column on Market Analyser to show green or red whether one moving average is above/below another. I did this by setting up a custom indicator for the difference between the two averages and then colouring the Analyser cells whether the difference was greater than/less than zero.

    So far so good.

    My question is: how do I tie together multiple conditions to colour a cell/column in Market Analyser?

    For instance if I want a green cell when (SMA1>SMA2 AND EMA1>EMA2), how do I achieve that?

    Thanks,
    John

    #2
    Hello John,

    You will need to create an additional custom indicator. Include the multiple conditions in the indicator. Subsequently load the indicator in the Market Analyzer.

    Comment


      #3
      Thanks for the reply Jason. Doing another custom indicator makes sense.
      Am I correct in saying that I can use an "if" statement to produce either a "1" or "0" depending on whether both conditions are met ("1") or not ("0"), then paint the cell depending on that 1 or 0 result?

      Is that the best way or have I missed your point?

      Thanks again,
      John

      Comment


        #4
        Yes that would be a way to approach it. Unfortunately I am not very familiar with NinjaScript; I am not sure what would be the best way.

        If you experience difficulties upon creating the alert, I suggest to check the NinjaScript - Indicators section of the Support Forum.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        27 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        117 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        69 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        226 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        414 views
        0 likes
        Last Post CaptainJack  
        Working...
        X