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 yertle, Yesterday, 08:38 AM
        7 responses
        28 views
        0 likes
        Last Post yertle
        by yertle
         
        Started by bmartz, 03-12-2024, 06:12 AM
        2 responses
        19 views
        0 likes
        Last Post bmartz
        by bmartz
         
        Started by funk10101, Today, 12:02 AM
        0 responses
        3 views
        0 likes
        Last Post funk10101  
        Started by gravdigaz6, Yesterday, 11:40 PM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by MarianApalaghiei, Yesterday, 10:49 PM
        3 responses
        10 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Working...
        X