Fix type conversion errors in OrdersEA_Smart_Grid
Changed initEquity from int to double to fix: - Line 217: double - int subtraction - Line 226: int * double / double calculation - Added explicit cast for BaseEquity assignment This resolves implicit type conversion warnings/errors in MT5.
This commit is contained in:
@@ -102,7 +102,7 @@ bool BelowLow;
|
||||
int tradeLogId;
|
||||
double closeOnProfit;
|
||||
bool bGetOutOK, bOpenNewTradesOK;
|
||||
int initEquity;
|
||||
double initEquity;
|
||||
int lotDigits;
|
||||
bool bWithdrawMailSent= false;
|
||||
bool bGetOutHandled;
|
||||
@@ -303,7 +303,7 @@ int OnInit()
|
||||
trade.SetDeviationInPoints(10);
|
||||
trade.SetTypeFilling(ORDER_FILLING_IOC);
|
||||
|
||||
initEquity = BaseEquity;
|
||||
initEquity = (double)BaseEquity;
|
||||
lotDigits = 2;
|
||||
|
||||
double tickSize = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_SIZE);
|
||||
|
||||
Reference in New Issue
Block a user