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 pvincent, 06-23-2022, 12:53 PM
            14 responses
            238 views
            0 likes
            Last Post Nyman
            by Nyman
             
            Started by TraderG23, 12-08-2023, 07:56 AM
            9 responses
            382 views
            1 like
            Last Post Gavini
            by Gavini
             
            Started by oviejo, Today, 12:28 AM
            0 responses
            1 view
            0 likes
            Last Post oviejo
            by oviejo
             
            Started by pechtri, 06-22-2023, 02:31 AM
            10 responses
            125 views
            0 likes
            Last Post Leeroy_Jenkins  
            Started by judysamnt7, 03-13-2023, 09:11 AM
            4 responses
            59 views
            0 likes
            Last Post DynamicTest  
            Working...
            X