指定
Hello,
change in existing EA.I want an Change in existing EA (LevelsEA_1.40) in opening of lots
order. For the future we have than 2 oportunities - one existing and one
new
EA does right no open the same lots for each level as basis order have.
I want an extra function - set activ or inactiv - Risk_of_Equity - example 10 % of Amount in Equity in lots.
Chang in existing EA.
Change is about lot calculation of opening order from EA. Right now
EA does use Lots from Basis order - in the Future I want an extra
function for each level opening lot calculation on basis of Equity
amount. See attached source Code
EA does open Lots on expecial criterias - first EA does open the lots on an Basis order - If Basis order has 6 lots EA does alwas open 6 lots. But now I want that EA open not fix the lots of Basis. EA should calculat the orders on - Risk of Equity.
New Parameter:
Risk-of-equtiy - activ or inactiv - inactiv is actual lot opening
Risk-of-equity - 10
input double RiskEquity_Percent=2;
//+------------------------------------------------------------------+
//| LotSize Calculation Function |
//+------------------------------------------------------------------+
double MoneyManagement(string pSymbol,double pFixedVol,double pPercent,double pStopPoints)
{
double tradeSize;
if(pPercent>0 && pStopPoints>0)
{
double balance=0;
balance=AccountInfoDouble(ACCOUNT_BALANCE);
double margin=balance *(pPercent/100);
double tickSize=SymbolInfoDouble(pSymbol,SYMBOL_TRADE_TICK_VALUE);
tradeSize = (margin / pStopPoints) / tickSize;
tradeSize = VerifyVolume(pSymbol,tradeSize);
return(tradeSize);
}
else
{
tradeSize = pFixedVol;
tradeSize = VerifyVolume(pSymbol,tradeSize);
return(tradeSize);
}
}
//+------------------------------------------------------------------+