Don't understand the usage of CMoneyFixedRisk
Illustrative examples:
Money Fixed Risk
- www.mql5.com
An example for calculating the lot value in accordance with the risk per trade.
Yes, I'll go with the code that is there. My bad, this is what I get for making a habit of browsing on the phone...
Hello to all,
as I understand it, first I have to include and declare the class
#include <Expert\Money\MoneyFixedRisk.mqh> CMoneyFixedRisk risk;I have to define the percentage that I want to risk in the method
after that I expected the class to give me double values of lotsize that allow me to stay in that risk percentage, depending on whether I was planning on going short or long:
or
But it didn't seem to work in this code example:
It only produces zeros.
I was also having trouble finding the respective passage that I needed in the article on CodeBase and I wasn't sure if I should post it there.
So why does it only produce 0.0 lots?