Forum

Strategy Tester, Offline Charts, ChartSetSymbolPeriod() and RefreshRates() in MT4

Hi, I've searched the internet in general and this forum and I cannot find an answer to my problem(s). I am trying to run an EA (M1) in the Strategy Tester (ST) and have an offline chart (M5) update beside it but I am getting no-where after several weeks of trying to figure this out. HELP! Select

Is it possible to get the user placed Indicator parameters values in code

Hi, I searched through the forum and could not find any answers... Once I place an indicator on a chart [in a separate window or on the main chart], is it possible to get the indicator's parameter values? For example, I place an ATR indicator on the chart and want to use the parameter value of

using build 670 and having brain fart - need help with iCustom in EA

Hi, I'm stuck and would appreciate some assistance... I'm trying to use iCustom in a EA. I have to supply a shift as the last parameter of iCustom but I don't want to look at bars I've already processed. I tried using the following: void OnTick () { int counted_bars=IndicatorCounted();

Is there any way to guarantee a fill price?

Hi, I'm trying to code an EA that will not react to the huge spread my broker generates during news. I realize "guarantee" is a strong requirement so maybe "reduce the impact" is a better. I know there is a slippage parameter in the OrderSend() function but it doesn't seem to work. As always, any

Is it possible to remove a manually entered trailing stop in code?

Hi, Is it possible to remove a manual trailing stop [originally created by right-clicking on a pending order and adding a trailing stop] in EA code? Any assistance would be appreciated. Thanks, Neil

Checking time in Strategy Tester

Hi, I'm using the following code as a time filter. It works well in my EA but not in the Strategy Tester . I know this has been covered elsewhere in the forum but I'm still at a loss. Any assistance would be appreciated. Thx Neil //+------------------------------------------------------------------+

Postmessagea & trailing stops

Hi, Does anyone know if there is a way in MQ4 (programmatically) to set trailing stops? This would be like mimicking right clicking on a currently open order and selecting the number of PIPs for the trailing stop. Thanks, Neil

Is there a way to do indirect referencing in MQ4?

I may be calling it by the wrong name... what I'd like to do is this... string varname = "EURUSD_High"; double <indirect varname> = High[0]; which would be converted to double EURUSD_High = High[0]; at runtime. Any help would be appreciated. Thanks, Neil