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

How to make a ray change shape?

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

    How to make a ray change shape?

    hello. I have this indicator and want to do this but not how. If two bars close above a ray ray changes to the dot. If there are again two locks below the ray ray disappears. Thank You.
    Attached Files

    #2
    Hello,

    Thank you for the question.

    I believe I understand what you are trying to do, let me double check if this is correct.

    You are drawing a ray once your condition becomes true and then you want to stop drawing the ray once you have reached this condition again is this correct?

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks for your reply.

      If a condition is given a ray is drawn. This is him.

      If you later two bars close above or below that ray ray that change their appearance.

      Then if that ray is traversed by two bars close above / below the ray ray disappears.

      forgive my English.

      Comment


        #4
        Hello,

        Thank you for the clarification.

        If you are assigning Tag names to the Ray's you can simply call the remove statement like the following:

        Code:
        if (Close[0] > Close[1])
           DrawRay("[B]TagNameHere[/B]", 0, Close[0], 10, Close[0], Color.Red);
                        
        if(Close[0] < Close[1])
           RemoveDrawObject("[B]TagNameHere[/B]");
        This is a simple example, you draw the Ray and assign "TagNameHere" as its tag or anything you want. Later when you want to remove it you can call RemoveDrawObject("TagNameHere"); to remove that specific object.

        Please let me know if I may be of additional assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by geddyisodin, Today, 05:20 AM
        3 responses
        20 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by lorem, Today, 09:18 AM
        1 response
        4 views
        0 likes
        Last Post lorem
        by lorem
         
        Started by bmartz, Today, 09:30 AM
        0 responses
        3 views
        0 likes
        Last Post bmartz
        by bmartz
         
        Started by GussJ, 03-04-2020, 03:11 PM
        14 responses
        3,245 views
        0 likes
        Last Post GussJ
        by GussJ
         
        Started by ArkansasClint, Today, 09:28 AM
        0 responses
        2 views
        0 likes
        Last Post ArkansasClint  
        Working...
        X