Stop and start negociations
-
I want my EA to stop trading if the following conditions are met on the day.
- When he reaches 2 gains not necessarily being consecutive.
- When he has 2 losses regardless of the amount of gains, and it does not have to be 2 consecutive losses.
Explanation:
I believe my EA is victorious by getting less and getting less exposed. He must do this daily, he has to go back to trading the next day or when being put back on the chart. Can someone give me an example in the form of a project for mt5?
-
Are today's results conditioned in any way by yesterday's results?
-
@l-andorrà said in Stop and start negociations:
Are today's results conditioned in any way by yesterday's results?
No, the results don't matter.
The EA must stop trading if one of the above conditions is met regardless of financial values. -
I did the following, I created a block (check flag) with flag name "META"
Then I created the block (set flag) with false and turned it on under the conditions that are verified once per bar, when it is met it changes to false not allowing any more negotiations, because I called the buy or sell blocks.
The other (set flag) with true, I called it under a block once a day, so that it turns the trades back on once a day.Is correct?
-
Before that I see you are using consecutive wins/losses blocks whereas you said they needn't to be consecutive. Is this a change in your strategy?
-
@l-andorrà said in Stop and start negociations:
Before that I see you are using consecutive wins/losses blocks whereas you said they needn't to be consecutive. Is this a change in your strategy?
Yes, I just want the EA to check how many transactions have made a profit and how many have lost.
If you answer what I want it hangs up
The next day he reconnects and checks again, a loop day after day.
An additional feature would be when placing the EA on the screen he calls and checks again consecutive gains and losses. -
All checks must be done on the same day
-
@fabiobioware @roar and @miro1360 can help here?
-
But is the limit of 2 wins/losses per day still required or not?
-
@l-andorrà said in Stop and start negociations:
But is the limit of 2 wins/losses per day still required or not?
yes, i need this condictions.
Yes, I need these conditions because I want to limit my EA to carry out a maximum of 3 operations per day.
From these 3 transactions, the combinations came out so that I avoid many losses, for this reason I am considering the limits of gains or losses within the 3 trades.-
When the EA has 2 winning trades, it stops trading on the day and only starts trading on the other day.
-
When the EA has 2 losing operations, it stops operating on the day and only resumes on the other day.
-
When the EA has 1 winning operation and 1 losing operation he must remain active and wait for the completion of the 3rd operation which will decide if he is a winner or a loser, that is, he will meet the previous conditions and if he will not be able to open more orders, only resumes operation the other day.
-
-
Ok. That¡s a more complex strucxture. Let's move step by step. This is the way tro control that no more than 3 trades will be done per day and thet the EA will not operate after the third one.

Now you need to use a condition block on top of your launching tree saying that ea_operational is true. Then you need to add +1 to the variable 'trades' every time a new trade is open.
-
@l-andorrà Okay, I saw that you created the variable "trade" but how do I count the number of trades?
-
Exactly as I explained in the last sentence of my previous post.

