Help with Loop and No Trade Block
-
Hi I'm trying to figure out this problem.
This opens a buy/sell with no trade block. When one closes in profit nothing else should happen until A: the other trade closes in profit (then opens a buy and sell) or B: it goes to the next negative level and opens buy and and sell again.
At the moment it is looping back to the no trade blocks and re-opening a new trade at the last Take Profit level instead of doing nothing.
I can't figure it out as i need no trade to open the trades but I also need the gap level after the trades are open (which is greater than the Take Profit)
-
Your logic in the EA needs to prevent a new trade being opened
-
I know, this is the point I can't figure out as I need no trade to open the buy/sell first?
-
Your EA is opening a trade, so when it closes set something to not open another until you deem it right to do so.
-
@jstap if you could give me another clue? I've tried "for each trade" and "loop break" below the open 1st trades area and also "once per trades" but I'm still at a loss with it?
-
how would you like to prevent a trade opening, something like wait for an hour.
-
A time block wouldn't fit with the logic.
Example: Buy/Sell open together and close at x pips profit. If Buy closes at 10 pip another buy should not open, if sell then closes at 10 pip then buy/sell reopens.
If one trade does not close at take profit, the other will. At the next gap which is greater than the TP another buy/sell opens (this works ok from blocks 18 to 29).
The problem is stopping the no trade from blocks 1 to 6 after running trade count is 1. It will open another trade as soon as TP is met.
Hope this makes sense! -
So in summary it may have more than one open trades on one side but only ever 1 trade on the other...
-
Maybe using purple/pink FOR EACH CLOSED TRADE, then blue CHECK PROFIT (last closed).
How do I use these to stop the next trade from opening until the next gap (if one trade is still open) and I would need the No Trade to work when both trades are closed? -
Like this from boxes 7 to 10
https://fxdreema.com/shared/JdkyvPX7c
But this still doesn't work and allows another trade despite the no trade nearby block?