You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I am trying to calculate Lot Volume in mt5 based on risk% and stop loss based on ATR(14), also i need pip value for the current instrument.
I am new to MT4/5 and C++, but i have managed to learn a lot and have managed to convert an MT4 Oscar indicator to work in MT5.
1. I have seen the code below posted several times for MT4, and it looks interesting to convert to work in MT5 so i can back-test indicators and my algorithm, and was wondering if this was still an efficient way to calculate the lot size?2. I am having difficulty understanding a few things, from my studies I have been told that to calculate these things you need to take into account whether the account currency, matches the base currency or counter currency as these affect the result and conversions are necessary. I do not understand how this is handled in this code. Any help would be grateful?
3. What is void InInitLotSize(), should this be placed somewhere else in an EA?
4. Where does MM_Fix0_Mod1_Geo2 come from?
5. What is ComputeTEF and TEF_value?
6. Where is the Stop loss entered, is it maxRisk = MM_MaxRisk?
7. - You must normalize lots properly and check against min and max. What are min and max?
I tried messaging William Roeder, but he does not accept messages.