Forum

Bar shift issue, why this happen?

In the first code the condition open_b is verified, in the second never. The only difference is the bar shift, I need one more condition on the 0 bar so I incremented the bar by 1. Why this happen? CODE 1 : //--------------Trading criteria------------------------------------------------- 5 --

PENDING ORDER is the best solution to Open a position few Pips less than Ask price?

Hi, I´m developing this mql4 EA, long story short, I´m stuck trying to place a pending order when all the condition are satisfied, and with an open price 10 pips less that the Ask value when all the condition are satisfied. The EA works well until the opening price is "Ask". I did a couple of try

Anticipate the position opening?

Hi everyone, it's like one year that I'm studying trading and automated trading. I'm trying to figure out different trading strategies in MQL4 using Metatrader4, manly focusing on forex scalping. I have a limitation on every algorithm that I create, the trade are open some pips too late, probably