Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw at exact MA plot crossover

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

    Draw at exact MA plot crossover

    Hello,

    Is there a way to draw an ellipse or rectangle on the chart centered not on the bar, but centered on the plot crossover of two moving averages?

    Thx.

    #2
    Hello Turtle Trader,
    Thanks for your post and I am happy to assist you.

    To assist you further can you post a screenshot of the chart depicting your requirement.

    To send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.

    For detailed instructions please visit the following link

    How to take a screenshot on your smartphone, tablet, notebook or desktop computer


    I look forward to assisting you further.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      cross of MA

      Hello,

      Attached is a jpg.

      I would like to draw where the moving averages cross, and not where the bars are.

      Please see the black rectangles.
      Attached Files

      Comment


        #4
        Hello Turtle Trader,
        Thanks for the screenshot.

        You can use the below code to draw the rectangle on the MA crossover:
        Code:
        if (CrossAbove(SMA(Fast), SMA(Slow), 1))
        {
        	if (CurrentBar > 2) DrawRectangle("rec" + CurrentBar, 2, SMA(fast)[0] + 2 * TickSize, -2, SMA(fast)[0] - 2 * TickSize, Color.Yellow);
        }


        Please let me know if I can assist you any further.
        JoydeepNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        152 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        87 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        131 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        127 views
        1 like
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        106 views
        0 likes
        Last Post CarlTrading  
        Working...
        X