Is there a way to configure the EA to wait for 3 consecutive losses and then enter orders?
-
Hi Tom, thanks for your response.
That could certainly be a way around the issue, but I'd like to know if there is a way to actually observe the first three trades (open fictive trades as Philipps described) and wait for the condition (3 losses in a row). -
@rafaels919 what do you think of putting an object line on the chart (like the first order) and observing the price? if the price comes against us we lost once and so on...
Condition TRUE == draw line 1 and so on..
At the fourth line open your trade
I misunderstood? -
Hey @ambrogio .
You mean placing objects as a fictive order? How would you configure that with blocks?if you could demonstrate what you mean, that would be great!
-
@rafaels919 what you think about a pending order? otherwise when the price touches the third line open buy now?

-
@ambrogio those lines are supposed to be triggered by indicators.
The question is the same, can you configure the blocks to wait for 3 losses in a row, before opening a real order. You know a way to do that with "pending orders"? -
@rafaels919 suppose your loss is 50 pips per trade

this is the case of pending order

this is the case if you want to draw a line

-
-
@rafaels919 I'd like to come back to the fictive trades approach. However, I have some more questions or thoughts to sort out.
-
Do you want to loop back on EA start and see if the last 3 signals were losses? That would make things more complicated and may be a task to do once the fictive trade thing is more clear. The issue I see here is that I can look back only candle based and not tick based. That issue could lead to the point that a candle size could trigger both SL or TP, but I can't tell what came first as the candle just has 4 prices (open, low, high, close).
-
If look back is not necessary, would it be okay to store the loss counts in a variable? That would have the side-efect that if the EA get re-initialized eg. when input parameter changed or terminal was closed and re-opened, ounting would start at 0 lossses again.
-
-
@trader-philipps And one more thing: Does the loss count have to divide sell and buy trades or does either of them count as long as it is a loss?
-
I found maybe one more thing just right now because i also try to unstand this variables. But maybe it helps you.

My idea would be. Let run one Demo account, and one REAL account with EA. Then send after 3 losses which the DEMO EA trades, and send the information to the real account EA. Its theory, but so everything starts
I know also that i had a trade copier some years ago to copy my trade for my clients. And there was an option, that they start to trade ONLY if the actual trade was already in minus. Means, if fxdreema can do it too, you can send also informations between 2 metatraders. Means one MT DEMO with EA,, and one MT REAL with EA. But i am only good in strategies atm. . To realize that idea you would need someone else
(possible is it, but dont know if fxdreema can do it too) If not, then buy a copytrader which can do it and your problem is solved. Hope it helps 
-
@tom-5 Hello, yes, that's actually something I researched a bit, and you would need some dlls. Also.. to have a straight copier is easier than to have it to copy selectively.
But that would certainly take the pressure off from the search for some Holly grail indicator, EA. -
@rafaels919 Wow, I had a glitch in the virtual trade part that drove me nuts. However, it's fixed now. Project virtual_trades_count
0_1575223717794_virtual_trades_count.mq4
And that's how it looks during virtual trade:

What I didn't manage is to draw the virtual trades in the chart. The problem is that I stored the time the trade was opened in a variable. But I couldn't manage so far to set that date as the start for the trendline I want to draw. Maybe someone with more experience in chart object may have a look at that.
-
@trader-philipps Outstanding excellent project! Felt inspired little bit :), so I tried to solve the draw trades part.
This is MA 5 x> 20 buy example.
The important thing is that the line has to be drawn after close condition, because that is when we have all data.
For the entry time, I used candle time, and counted candles so I could have the Candle ID. Closing time is ID1 after close condition.
Price variables (open and close) are modified when conditions happen.
https://fxdreema.com/shared/NQ06zsQnb
This is not adapted to the project, this is figuring it out project :). Fun.

-
@cpxiom Great approach. Was not sure how to store the candle ID on the open trade part as it moves with every candle. Will have a look later and will try to add it to the project.
-
@rafaels919 Here is the updated version.
For all others here....
DON'T USE THIS ON REAL ACCOUNT!! THE ENTRY CONDITIONS ARE SET TO GET MANY LOOSING TRADES!!Changes:
- Implemented Spread Betting Sequence
- Tokenize Sequence in order to calculate max consecutive losses
- Implemented Virtual Trades as trendlines in chart (thanks to @CPxiom for inspiring me). The issue was that I used datetime datatype in the trendline open instead of a string datatype)
Bugs fixed:
- Fixed a glitch when changing from live to virtual trades. Cannot use Max Consequtive losses in combination with virtual trades.
- Fixed an issue when virtual trade variables were cleared too early
- Removed some debug stuff
0_1575349650831_virtual_trades_count.mq4
Link to project
And that's how it looks like now.

Here is an extract of a tester run in order to check lot sizes in correct order.

-
@trader-philipps This looks really really great, and it's a very important project. It's more than what meets the eye here...You're the inspiration.
-
@rafaels919 Here are the settings when using tester.

-
@rafaels919 Here is the latest version of the EA.
Changes:
- Added Phases (1-3) including control block
- 3rd Phase looks for n virtual wins after Phase 2 (real trades) ended with max consec. losses
- did some cleanup
0_1575428806515_virtual_trades_count.mq4
I did some basic testing and it looks as it performs as it should. However, there may be more testing required as it takes some time to get through all the phases.
That's how it looks now:

-
That looks great! Thanks very much @trader-philipps and everyone who tried to help on this case!
-
@rafaels919 As of last request, here is the latest version.
Changelog:
- Re- introduced max number of virtual trades configurable in EA settings for Phase 1