I thoght it was correct, instead...what's wrong??
-
Hi everyone.
I'm testing an EA where it buys when, first, the condition 1 is met.
So, if current Ask, increased by gap in pips (a value in pips i set under condition; in this case i set it to 1) is above previous close, then do nothing; otherwise go to the condition 2...then BUY!
But here i attach the trade it took today:

Due to the strong spread the ask price was above the previous candle close at the time it opened a buy position. The previous condition 1, then, was true in my thoughts, so why it went to the condition 2 and moreover it arrived at the BUY??
-
Are you 100% sure the ask price never went below the open price? Your ea works tick by tick, so even 1 tick of low ask price triggers your buy.
Remember, there is usually some slippage in the order, you don't get precisely the price you wanted (when buying the market price) -
@roar
Hi roar, is what i hope for the ask price to be lower than the open price!
Indeed i don't want it to open any BUY trade if is above...
Then i really don't know why.Maybe because of slippage but at such hours of the night i think the spread only is the enemy. Then i don't trust so much in slippage problem in such low volatility period
-
Can you make an EA that shows the problem easily in the Tester? I would first display the values with "Trace" block to see if they are correct. Also, I'm not sure why are you using the Ask price, but remember that the candles are based on the Bid price.
-
@fxdreema
Hi man, thx for the reply. I need the ask price because of the BUY block.
Also i cannot test it since in tester there's no option about the variable spread i can have in some night hours. Then the test would be useless for my problem.It simply hasn't to BUY if the ask is above the previous candle close...
Moreover i set at the top of the blocks "weekday filter" where i want the EA to trade only in some days of the week.


But it took a trade on monday (today) regardless of this filter.
Since i'm a newbie i'm sure the errors are mine and not some bugs, btw i don't know where they are

-
@alessandromagno
Sorry the monday filter it was my fault because it wasn't updated.
I apologize for this.I hope to find a solution for the first issue
-
So, if you backtest the strategy, will you get the Buy trade at that place again?