Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Risk-Reward tool question

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

    Risk-Reward tool question

    Hi,

    When the risk reward tool's display unit is in "currency mod" is its possible to count the risk with the order qty or it is a fix qty?

    #2
    Hello,

    The Risk/Reward tool is set to a fixed quantity of 1 for non-forex instruments, and uses the Account.Accounts[0].ForexLotSize property to set quantities for forex instruments.

    That being said, it should not be too difficult to modify this Drawing Tool to use variable quantities to determine risk in currency terms. If you are familiar with NinjaScript, take a look at line 113 of @RiskReward.cs as a starting point.
    Dave I.NinjaTrader Product Management

    Comment


      #3
      Thank You!

      I opened it. I've use FXCM feed. What I have to change?

      Comment


        #4
        One way that you might go about this is to expose a public int property which can be used to set the quantity explicitly in the Drawing Objects properties window, then use that property to set a private variable which you can use to multiply the result that is already being calculated in the script.
        Dave I.NinjaTrader Product Management

        Comment


          #5
          Can you send me a script what I have to paste? I'm not familiar with Ninjatrader programming. Thanks for Your help!

          Comment


            #6
            Hello,

            Thank you for the reply.

            This item would require programming in order to complete as this would not just be a single line change or an item that could be copied and pasted simply.

            Essentially to allow the existing tool to do what you have asked the following item would need to occur:
            • You would need to duplicate or make a copy of the existing tool.
            • Edit the code so that the duplicate is no longer a duplicate name but has a unique name and test that the tool shows up in the drawing tools menu correctly and works as the other tool does.
            • You would need to add code for a public property and test that has worked to have a input for a value.
            • Finally you would need to locate the logic in the region after line 113 and change it to use the public property as needed.


            There are existing samples of the input, and of the drawing tool so that would assist in your learning if you feel you would like to learn NinjaScript to accomplish this, otherwise this would be an item you would likely need to have created for you if you did not want to code it yourself.

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

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by ageeholdings, 05-04-2024, 03:21 PM
            1 response
            3 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by claxxical, 05-30-2017, 12:30 PM
            39 responses
            4,501 views
            0 likes
            Last Post fiendtrades  
            Started by tonynt, 05-21-2019, 06:27 AM
            12 responses
            541 views
            1 like
            Last Post fiendtrades  
            Started by alexstox, 10-16-2018, 03:29 PM
            12 responses
            355 views
            0 likes
            Last Post Tburg1073  
            Started by truepenny, Today, 03:59 AM
            0 responses
            5 views
            0 likes
            Last Post truepenny  
            Working...
            X