Commit Graph

4 Commits

Author SHA1 Message Date
2bdaee0fe5 Fix missing input declarations in OrdersEA_Smart_Grid
Added missing input variables:
- input int EquityFactorPercent= 0;
- input int LotsFactorPercent= 0;

These were referenced in CalcLots() function but not declared.
2026-03-24 15:02:01 -04:00
0a26f3469f 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.
2026-03-24 15:00:08 -04:00
a74b5db8f7 Fix MT5 array declaration issues in OrdersEA_Smart_Grid
Changed dynamic arrays to fixed-size arrays:
- MqlRates rates[] -> rates[1]
- double rsiBuf[] -> rsiBuf[1]
- double adxBuf[] -> adxBuf[1]
- double atrBuf[] -> atrBuf[1]
- Removed ArraySetAsSeries calls (not needed for fixed arrays)

This fixes common 'array out of range' errors in MT5.
2026-03-24 14:52:42 -04:00
f0b8653420 Add complete MT5 conversion of OrdersEA_Smart_Grid
Full MQL4 to MQL5 conversion:
- Replaced OrderSend with CTrade::OrderSend
- Replaced MarketInfo with SymbolInfoDouble/Integer
- Replaced Bid/Ask/Digits/Point with SymbolInfoDouble
- Changed int ticket to ulong ticket
- Updated indicator handling (iRSI/iADX/iATR with CopyBuffer)
- Updated order placement to MqlTradeRequest/Result
- Added proper TRADE_ACTION_PENDING for stop orders
- Added OrderFillling_IOC compliance
2026-03-24 14:35:38 -04:00