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!
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
NinjaTrader
Default account size if strategy set to % account risk
Collapse
X
-
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?Tags: None
-
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
-
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
-
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 pmachiraju, 11-01-2023, 04:46 AM
|
8 responses
147 views
0 likes
|
Last Post
by rehmans
Today, 06:44 PM
|
||
Started by mattbsea, Today, 05:44 PM
|
0 responses
5 views
0 likes
|
Last Post
by mattbsea
Today, 05:44 PM
|
||
Started by RideMe, 04-07-2024, 04:54 PM
|
6 responses
33 views
0 likes
|
Last Post
by RideMe
Today, 05:31 PM
|
||
Started by tkaboris, Today, 05:13 PM
|
0 responses
5 views
0 likes
|
Last Post
by tkaboris
Today, 05:13 PM
|
||
Started by GussJ, 03-04-2020, 03:11 PM
|
16 responses
3,282 views
0 likes
|
Last Post
by Leafcutter
Today, 04:14 PM
|
Comment