DeanDeV: Please excuse this if this is completely incorrect, however, is it possible to do something like this:
It is possible, I am sure. The thing to remember, for a lot of the problems that people are trying to solve, there is usually more than one way to get the desired result. The trick is finding out which of all of these possible solutions is the best one to use. By best possible, in this case at least, I would consider how many lines it takes to solve the problem, because usually more code means more processing time. And more processing time means the longer it takes to actually do anything as far as the purpose of the EA.
I simply would like something like this...
Any way to do this instead of typing them all out??
Lots = int(AccountBalance() / 1000) / 10.0;
However if you're not using a proper SL, then even 0.1 lots means your account is at risk (EURUSD 1.2345) $12,345.00 (buy)
Please excuse this if this is completely incorrect, however, is it possible to do something like this:
You can do it like this....this EA for Example
Can you help me,
I want to make lot size settings in accordance with the risk options
==============
double Lot_1 = ?? // Options from "Low_Risk or Med_Risk Or High_Risk
double SL_pips = 30;
==============
enum Risk
{
Low_Risk, Med_Risk, High_Risk,
};
extern Risk Risk_Options;
If i Choice Low_Risk, it mean i use Lot_1 = NormalizeDouble ((AccountBalance() * 5% / SL_Pips),2)
or
If i Choice Med_Risk, it mean i use Lot_1 = NormalizeDouble ((AccountBalance() * 10% / SL_Pips),2)
or
If i Choice High_Risk, it mean i use Lot_1 = NormalizeDouble ((AccountBalance() * 20% / SL_Pips),2)
====================================================================================
Okay I can confirm this works:
For anyone who reads this and needs something similar. :)