Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

EMA Paint bar

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

    EMA Paint bar

    Hi,

    I have found this indicator:

    Smaoverunderpaintbar NT8 | NinjaTrader Ecosystem

    In the code how do I remove the MA line from being displayed? I just want the bars changing colour and nothing else.

    It's ok I figured it out =]

    Cheers thanks
    Last edited by t00sp00ky; 06-20-2021, 09:01 AM.

    #2
    Hello t00sp00ky,

    On line 74, ttt is assigned a value from SMA(Close, sMA)[0];. This can be changed to the EMA.
    On line 75, uuu is also assigned a value from SMA(Close, sMA)[0], which can also be changed to the EMA.

    Below I am providing a link to a forum post with helpful information about getting started with NinjaScript and C#.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Yep I got it thanks.

      Just a quick question that may sound ridiculous but is alluding me on this platform which is new to me. How do I set an alert to trigger when price is crossing above/below a MA? But only when the bar has closed crossing in the correct direction. Not when it has touched, not when it beyond, only when it has closed crossing the MA.

      Also once in a trade, the lollies that display your sell LMT and STP etc, can they be modified so they are longer, so they are not in the way? I would prefer them to be in the centre of my chart not offset to the right as they are atm

      Thanks
      Last edited by t00sp00ky; 06-24-2021, 02:23 AM.

      Comment


        #4
        Hello t00sp00ky,

        CrossAbove() / CrossBelow() can detect a cross with Calculate.OnBarClose.

        If the script is running with Calculate.OnEachTick or .OnPriceChange, you would need to make a direct comparison when FirstTickOfBar is true.
        Code:
        if (FirstTickOfBar && Close[2] < EMA(14)[2] && Close[1] > EMA(14)[1])
        ChartTrader cannot display orders a different way. But you can turn off ChartTrader and use drawing objects to mark orders / trades from OnOrderUpdate().

        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hi,

          Can this not be set up in the alerts menu so I can apply it to any MA not just this paint bar indicator? There seems to be lots of options in the menu apart from on bar close, I seem to have tested them all with no joy so far

          Comment


            #6
            Hello t00sp00ky,

            This is posted in the Indicator Development section of the forums. Are you asking about the Chart Alerts window (Platform Technical Support section of the forums) and not developing a custom indicator?


            The CrossAbove/CrossBelow can be setup in the Alerts window conditions. This would be real-time and would not be just when the bar closes.
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            598 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            343 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
            557 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            555 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X