Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 Aviram Y, Today, 05:29 AM
        0 responses
        1 view
        0 likes
        Last Post Aviram Y  
        Started by quantismo, 04-17-2024, 05:13 PM
        3 responses
        25 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by ScottWalsh, 04-16-2024, 04:29 PM
        7 responses
        34 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by cls71, Today, 04:45 AM
        0 responses
        6 views
        0 likes
        Last Post cls71
        by cls71
         
        Started by mjairg, 07-20-2023, 11:57 PM
        3 responses
        216 views
        1 like
        Last Post PaulMohn  
        Working...
        X