Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I have a particular question with regards to a money management code improvement.
Currently, I use the following code to make sure I can control the max risk per trade in a strategy with "MaxRiskperTrade":
Now that leads to the effect that the nominal value of the trade sometimes gets too high for my taste. Therefore, I would like to additionally limit the trade size via introducing a new variable "MaxTradeSize" which represents a currency value. vTradeSize should then by whatever leads to the lower outcome MaxTradeSize divided by Price or MaxRiskperTrade / Math.Abs(Close[0] - IndicatorValue[0])
The question would be, how can I best code this. I want to code the following logic:
Hope someone from this community can help with that problem!
Can you help answer these questions from other members on NexusFi?