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

Default account size if strategy set to % account risk

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

    Default account size if strategy set to % account risk

    Hi guys... I have a strategy which uses a % risk to hanger position size, i.e. if the strategy determines a 200tick entry to stop, and % risk is set to 1%, that will be a larger posisuon than if 400ticks are determined at the same 1% risk. In evaluating the returns, what account size would be used for the % calculation if nothing stated in the strategy?

    #2
    Hello visounds,

    Thank you for the post.

    I wanted to check, are the percent risk and percent calculation you are referring to a custom part of your strategy? If you are referring to a custom part of your strategy, the easiest way to find this out would be to use Prints and see what the script calculates in that situation on a sim account.

    Can you provide more specific details on this question?


    I look forward to being of further assistance.

    JesseNinjaTrader Customer Service

    Comment


      #3
      Hi Jesse,

      it is a complete custom strategy yes. But when you say "use Prints", do you mean like open an Output Window, I don't know "Prints" in my limited capacity.

      Comment


        #4
        Hello visounds,

        Thank you for clarifying.

        In this case, the way to locate the answer would be to debug the script to see what happens in that situation. If this is not something you have developed you would need to contact the developer for further information on how this specifically works. Otherwise, if this is something you are developing, Prints would be used which output data to the NinajScript output window. This is something you physically change in the strategies code.

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

        Comment


          #5
          Hi Jesse,

          Is it possible to create code totallow an entry of number value in strategy analyzer, something like "starting account value". If so, can you supply the type of code that would make this work please.

          Comment


            #6
            Hello visounds,

            Thank you for your response.

            You would need to create a value in your script such as an int or double. This value would then be updated when a position is closed based on whatever factors you prefer, perhaps the PnL of the trade.

            So you would need a value that you start with and then you would need to use OnPositionUpdate(): https://ninjatrader.com/support/help...tionupdate.htm
            You can also look into the Trade Collection as well: https://ninjatrader.com/support/help...collection.htm
            And ensure you use IncludeTradeHistoryInBacktest: https://ninjatrader.com/support/help...inbacktest.htm

            Please let me know if you have any questions.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by alifarahani, Today, 09:40 AM
            6 responses
            33 views
            0 likes
            Last Post alifarahani  
            Started by Waxavi, Today, 02:10 AM
            1 response
            17 views
            0 likes
            Last Post NinjaTrader_LuisH  
            Started by Kaledus, Today, 01:29 PM
            5 responses
            14 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by Waxavi, Today, 02:00 AM
            1 response
            12 views
            0 likes
            Last Post NinjaTrader_LuisH  
            Started by gentlebenthebear, Today, 01:30 AM
            3 responses
            17 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Working...
            X