Turn off Blocks stops working after several trades
-
Can someone please help me. I have used a Trailing Stop and Breakeven strategy that uses Turn off / On Blocks (I found it in the forums). But after a few trades, it stops turning off or on. Can someone please show me how I can use this same function for every trade.
-

-
Could yoy please share the whole project to see it in more detail?
-
https://fxdreema.com/shared/dhV9kYrOb
Thanks for any help. I think I may have fixed it. Block 123 "not more than "n" trades was set to only 1
My next question is do I need to do something special to trade multiple pairs?
-
First two questions.
- Why are blocks 81 and 130 unconnected? I guess you know lonely blocks don't work.
- What's the logic behind turning on/off the profit under 100 pips only?
-
-
81 and 130 were still sitting there unused I just had not removed them yet.
-
The Idea is after trade hits 75 pips I close half the position but I won't start the trailing stop or breakeven until 100pips It checks for trailing stop conditions first and if not it will move to Breakeven.
I want to base it off of the 2x ATR but I don't know how to calculate it correctly. Since each pair is different. -
Can you help me do a better way that will work continuously for each trade it places?
-
What about a way to load it on 1 chart with all the pairs (Block 130)? When I try it it does not work on a live system.
Thank you again
-
-
I will give you a hand, but you ask for many things at the same time.
Let's do it step by step. Firstly, remove those old lonely blocks. Then renumber block 86 as number 1. Now it has a higher number that block 29 (if trade). That means that block 29 is the first one to be activated every tick.Blocks 85 and 15 should be moved above blocks Asbuy and Ashsell. Not because they are wrognly posiotioned, just because logic will be more clear so.
Personally I would not turn on/off any block. Why do you want to do it? I think that is not necessary, IMHO.
-
When I looked up how to add a Breakeven and Training stop, one example had the turn off and turn on block. No other reason to use it.
-
changes complete
-
Can you please share the new version to continue reviewing it?
-
https://fxdreema.com/shared/mjlIKdaA here is the link to the full system.
-
Ok. Here you have my first suggestions:
-
All 'AND' blocks are unnecessary. Ther are designed to unite two upper blocks to a single o more further blocks. This is not your case. Just join your blocks one after another without any of those 'AND'. They are adding superfluous code to your EA.
-
What is the logic behind having those two on/off blocks? Honestly I think you cound simply remove them.
Please confirm this is what you want to do:
- A buy/sell is opened.
- When more than 100 pips or 50 € are achieved, close partially that order at a 50% size.
- When conditions under block 29 are applicable, the order is closed.
What I don't understand what are you expecting the EA to do with all under block 123.
I would appreciate some additional info, please.
-
-
All 'AND' blocks are unnecessary. Ther are designed to unite two upper blocks to a single o more further blocks. This is not your case. Just join your blocks one after another without any of those 'AND'. They are adding superfluous code to your EA.
RemovedWhat is the logic behind having those two on/off blocks? Honestly I think you cound simply remove them.
If I do not turn it off it will close 50% and then close another 50% of the same trade if conditions are met.Please confirm this is what you want to do:
A buy/sell is opened.
When more than 100 pips or 50 € are achieved, close partially that order at a 50% size.
Yes
When conditions under block 29 are applicable, the order is closed.
Yes
What I don't understand what are you expecting the EA to do with all under block 123.
After it closes 50% stop loss moved to break even and trailing stop starts moving up by 1 pipThanks for your time. I hope this clear it up
-
Honestle, remove all turn on/off blocks and use this structure (for buys only, you need to duplicate it for sells):
https://fxdreema.com/shared/fpYNtN5R
Let me know if it fits your EA.
-
Ok I will let you know if it works. Thanks alot
-
https://fxdreema.com/shared/xHtpCcoWd
It will close half but the trailing stop doesn't start
-
Is that the only problem. Do all other features work correctly? I see block 29 is on/off selectable when no turn on/off blocks are present now.
-
I left block 29 off cause I was testing. Its opening and closing half of the trade. But then it closes it will close another half. So since the trade size is 0.05 it closes 0.03 and the the remaining 0.02 is closed in two trades of 0.01 immediately after at the same price
-
I had to turn the block off to get it to work.
any idea of why it only trails the buy trades? it will not trail sell trades -
@ejsellers said in Turn off Blocks stops working after several trades:
I left block 29 off cause I was testing. Its opening and closing half of the trade. But then it closes it will close another half. So since the trade size is 0.05 it closes 0.03 and the the remaining 0.02 is closed in two trades of 0.01 immediately after at the same price
I thought this is what is was intended. How many partial closes do you want per trade?