Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to get static override correct

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

    How to get static override correct

    Hi Team/Fellow Users
    I have manipulated some code I found and have a multiple risk reward indicator that works very nicely as a DrawingTool.

    MultipleRR.zip
    However I cannot for the life of me work out the static override so that I can Draw.MultipleRiskReward(.......)

    Is there anyone that can provide some help or assistance and then I can place it in the UserApp section for others to use.
    Attached Files
    Last edited by Mindset; 07-16-2023, 02:15 AM.

    #2
    Instead of 'static override' you can try using 'static new'.

    Good reading here,

    Comment


      #3
      Hello Mindset,

      Thanks for your post.

      You will need to create a static partial Draw class at the bottom of the DrawingTools file.

      You could view the static partial Draw class at the end of any DrawingTools file to get an idea of how this would be done.

      For example, you could view the RiskReward file in the DrawingTools folder in the NinjaScript Editor window to see the static partial Draw class in that file.
      <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

      Comment


        #4
        Ok thanks. This is way outside of my knowledge zone but I will give it a go.

        Comment


          #5
          Sorry this is beyond my capabilities.
          The code I manipulated is fibonacci retracements rather than RiskReward and I can copy the partial class over but it doesn't help me with the static draw override. Ive tried a few combinations but I am not understanding the Class reference. If I reference anything other than fibonnaci retracements it produces errors even though the Class appears to be WCJRiskRewardR??
          I will admit defeat on this one as it works perfectly using the mouse and after so many hours of looking at stuff there are other things i need to do - I would just love to have had the ability to use it in NS.
          Last edited by Mindset; 07-17-2023, 02:31 AM.

          Comment


            #6
            Hello Mindset,

            Thanks for your notes.

            I suggest that you study the public static partial Draw class at the bottom of any of the DrawingTools files in the NinjaScript Editor window to get an understanding of how this class would be set up and works.

            Then, you could create your own public static partial Draw class at the bottom of your custom DrawingTool and implement similar logic see in the other DrawingTool files.
            <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            633 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            364 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            105 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            567 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            568 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X