Hi, This adaptation of the Edit example code populates the Edit text with the spread when the EA loads, but I need it to update the text with the current spread with each tick. I found solutions using the old object oriented approach but not the new object oriented approach. I tried updating using
The example code at https://www.mql5.com/en/docs/standardlibrary/controls/cspinedit works fine for me (v.5.00 build 2302) but when I change the minimum, maximum, and current value parameters from 10, 100, and 50 to numbers with a decimal (e.g., 0.00001, 0.00010, and 0.00010, respectively), I get
I am using MT4 on a broker demo account and when I send an order then this type of message shows up in the Journal tab: 2019.06.11 17:00:11.696 Trades: use hosting service to speed up the execution - 1.85 ms via 'MQL5 London 6 (MQL5.community)' instead of 156.98 ms Is there a way to turn this
I want to code an EA that runs continuously but takes a position not more than once per day, and am interested in how others have logically approached this. My current logic is: if P == 0 (and other conditions are met) then take a Position and set P = 1 if current time < previous time then set P = 0
I want to declare these to variables in an EA: int ema_lookback = 10; double ema_wgt = (2 / (ema_lookback + 1)); When I declared both globally then ema_wgt was initialized as 0, and I found that a global variable can be initialized only by a constant. So then I declared ema_wgt globally and