How to turn off block after a winning trade?
-
Hi.
I am running a sell order with a custom betting sequence but I can't find how to turn off the sequence when I have a winning trade??
How can I turn off the selling block when the profit is reached?Thank you very much!


......
Untitled-1.jpg -
"Sell now" is designed to always create a trade when it runs. MM settings only change the lot size, but not the fact that the block is gonna create some trade even if the requested lot size is 0.
So, detect that the profit is reached and don't run "Sell now". This is the approach, but how to do it'... it depends really. Maybe you can detect consecutive profits or losses, there are blocks like "Check consecutive profits" and "Check consecutive losses". It depends
-
OK, good, I'll try it, but can you tell me how to connect these blocks to get what I want?!
Thanks. -
Ok, it works fine with check consecutive profits, but with 1 it gives me 2 winning trades and with 0 it stops after the loss.
-
But when do you want to stop "Sell now". And I don't understand why, because obviously this is the only block able to make a trade over there. Maybe stop it for a while...
I don't know what to suggest. There is "Once per trades" (I neve really used it), there is a way to disable some blocks and then enable them, there are endless ways to prevent some block from running (putting conditions and filters above it).
When profit is reached... what profit? There are different profits. The profit of a single trade. The current unrealized profit (Equity-Balance). The profit of the last hour. The profit of the last 10 trades. The profit of the last 24 hours. The profit of today (until 00:00). That's why I said that it depends.
-
There is also easy way to check the lot size of the latest closed trade, if this can be used: https://fxdreema.com/shared/RxENL906c
-
Maybe my explanation is wrong!
There is a custom betting sequence with "sell now", the only thing I want is to stop the EA as soon as I have a winning trade, the $, the time or the size is not important, as soon as this EA makes a profit, I want it to stop.

-
It's also easy to detect if the latest closed trade was profitable or not. The example from my previous post can be used (but to check profit) or "Check last closed trade profit", which is the same idea.
-
Thanks again.
I finally did it like that, it works.

-
Hi Admin.
It works exactly how I wanted, thank you very much! But now I have the opposite problem, the EA does what I want live, but when I reached the profit and it has been turned off, I can't turn it on again! As the last trade was profitable, I can't turn it on again.
I tried to close MT4, remove EA, nothing works because whatever I do, the last trade remains profitable.
I could add reset counter each day, but if I want to turn on again the EA the same day, it will not work?I hope I well explain my problem this time! Do you have a solution for that?
Thanks!


......
1111.jpg -
But there is no block for turn ON, I only see turn OFF in the picture

-
Yes that's the question!
How can I do it "manually"?When the EA has done its job, I can't make it work again, because when I try to make it run for the second time, it does not work because the last trade was winning, so it does not start...
-
Hi.
How can I connect it to be able to restart the EA, for now, I run it, and when the profit is done, I can't run it again, never.
And I think it conflict if I run it with few pairs.https://fxdreema.com/shared/1k4aT9kzc
Thanks.
-
I can't say how, because it depends
Obviously if you run "Turn ON blocks" after that, block 10 will be enabled again. But when to run that "Turn ON blocks"... again, it depends. My question is, do you really need to use these blocks 
-
This is exactly what I wanted to do!
Can you tell me if it's the simplest way?Now it works perfectly.