footfairy11:
Hey guys, first post here.
I am building an EA that needs to work on both Forex and Stock Indexes.
For some reason, my StopLoss (pips) and my Lot Size calculation messes up when it comes to the stock indexes.
Does anyone have experience building an EA that can handle both Forex and Stock Index?
my guess (without you showing the code), your code should consider MODE_PROFITCALCMODE
https://docs.mql4.com/constants/environment_state/marketinfoconstants
Symbol Properties - Environment State - Standard Constants, Enumerations and Structures - MQL4 Reference
- docs.mql4.com
A zero value of MODE_STOPLEVEL means either absence of any restrictions on the minimal distance for Stop Loss/Take Profit or the fact that a trade server utilizes some external mechanisms for dynamic level control, which cannot be translated in the client terminal. In the second case, GetLastError() can return error 130, because MODE_STOPLEVEL...
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
Hey guys, first post here.
I am building an EA that needs to work on both Forex and Stock Indexes.
For some reason, my StopLoss (pips) and my Lot Size calculation messes up when it comes to the stock indexes.
Does anyone have experience building an EA that can handle both Forex and Stock Index?