Trading Conditions blocks Not working after break even block is activated
-
Hi,
When I enter a trade e.g. Buy Trade (Take profit 50, Stop Loss 20)
I have placed breakeven block after 10pips
I then have the check trading conditions block (Check Type - Last Loser as Buy Type) to open a sell trade when its true.So initially, a buy trade is entered, when market moves 10 pips up, the breakeven block is triggered moving the stop loss to breakeven, when the market reverses and hits the stop loss at break even, the Check trade block of Last loser as Buy is not triggered to open the sell trade.
This is a technical error. Please fix this problem.
Below is the sample code:Check Type - last loser block not working after Break Even block is activated
Let me know when this is fixed.
-
@kekhumbo Swap block numbers 4 and 6. They are executed in the wrong order.
-
Hi @l-andorrà ,
I have revised the EA to include the block numbering. But its still not working.
When the first trade of the buy starts with hitting the take profit, everything works ok.
When the first trade of the buy starts with hitting the stop loss without triggering the break even block, everything works ok, meaning a sell trade is placed.But when the first trade of the Buy triggers the breakeven block and stop loss moves to breakeven, and the market reverses to hit the stop loss at break even, a sell trade is not triggered. Why? Please help.
Review the new EA through this link:
Check Type - Last Loser block not working after Break even is triggered
From the link above, when break even is hit, a sell ordered should be triggered but its not being triggered. Please assist why sell trade is not being triggered.
-
@kekhumbo You need a completely new structure like this:
https://fxdreema.com/shared/4EUKTo4Q
You need a variable telling the EA that the BE is moved before the new condition of opening a new trade happens.
-
@l-andorrà , I have tried the sample code you have sent me but its not working.
From your sample code, If we place the first trade as buy, once the breakeven block is activated, and the market reverses and hits the stop loss at break even, the sell order you have specified at the "on trade" tab will not be triggered.
Please check.
-
I think you have to remove the SL and TP parameters in each BUY NOW and SELL NOW, in order for other blocks to affect it.
-
@jsauter86 , If stop loss is removed from Buy Now or Sell Now so how will the break even be triggered?
The issue here is that when the breakeven block is triggered, and market hits the stop loss at break even, blocks like Trade Closed, No Trade etc are not working.
E.G. a Buy trade is entered
Market moves bullish and triggers the breakeven block to move the SL to break even
Market moves bearish and hits the SL at break evenWhen I use the "Trade Closed" block under the "On Trade" tab, and i specify it to open a sell trade, the sell trade is not triggered because "Trade Closed" block doesnt know if the trade was closed or not because its stop loss was modified.
Please assist.
-
test it and find out!