Man... your chart is beautiful. How did you do that?
I see you've implemented the idea you describe before (Good work!)
and I bet you also have met a similar problem as I faced before using this kind of technique (we both know what is it). If this technique combined with an auto lot as I suggested before, it will create another problem (ah! one after another). I've tried it before. They simply never give up in their attempt to annoy us, didn't they?
Yup, this is why I'm suggesting you to wait for a signal before opening a new trade either for hedging or martingale. I don't know how you imagine this but it's how I did it. The loop usually already close on its first loop and only sometimes its goes for the double loop (which is bad in my opinion).
but for some reason, I haven't seen it thoroughly yet (too lazy), it still spikes down like the picture Icham post earlier (lol) -
but because of it just 10% of the total balance, so I don't really care, It's ok. The EA will scalp back faster than that.
It made it two times in 3*24h. Two times were this kind of entries : inappropriate short entry
I have an excellent excuse Ahmad, authentical random entries. To improve the performance of the system Ahmad, it's excellent, if I can find a way to manage those case without signals, with signals it'll be even better.
Corrected that :
Almost the only fail remaining for this EA :
@Rafael Grecco if you find a solution let me know please !
Hi, that is an offline chart. It's a Median Renko (also called Mean Renko).
The main problem with it is that to make backtests, you need an external software to generate the historical chart using data downloaded from StrategyQuant.
Not yet... I don't think it is possible to prevent that from happening, what I am trying to do is postpone as much as possible that from happening, using several different strategies.
For example, let's say we close trades at a loss when drawdown is at 10%. On a historical chart that happens 10 times on the last 5 years. I am trying to reduce it to 2 or 3 times on that same period.
What I am trying to say is that loss will eventually happen, the best we can do is postpone that as much as possible to keep the final profit positive.
Oopsss it did it again. It happens too much to be really interesting and it definitively needs a fix.
Still the same problem, margin exceeded, when I'll find a solution, this EA will be valuable. Sometimes finding solutions ain't about time or code, one may need inspiration also.
edit : and once again just after like the previous one ! - stupid math problem -
I also switch to a 75/150 recovery zone to increase velocity and test it during week's last day.
As the recovery zone is smaller, it opens more positions, so reach more quickly the situation described above.
edit : solutions' lacking - i limit to 3 hedge orders for now, and i'll try to compensate with a risk/reward implementation, later.
edit : annoying.
2018.05.11 16:06:14.358 Trades '*': failed instant sell 0.58 EURUSD at 1.19639 (deviation: 10) [Request rejected due to absence of network connection]
2018.05.11 16:06:14.358 Network '*': connection to MetaQuotes-Demo lost
Icham, I don't think changing the trade zone size, limiting hedges number or any simple strategy alone will be the solution to this problem. As you said earlier, one needs inspiration, something different... we must create unorthodox strategies to be successful.
I usually have insights while I'm showering, driving... I'm always thinking of new strategies when I am away from my computer. Yesterday night, after a crossfit workout, I was exhausted, lying on the floor, when something came to my mind. I ran to write it down before I forgot it.
Today I applied it to my code and after some adjustments, I have a stable EA. Profit is still very low, like 2% a year for each pair. I could easily run 10 pairs simultaneously to have 20% a year, but I still think it is too low. But now I have something to work on. I'll improve profit while keeping risk as low as possible.
One example of my current strategy:
In 6 years, it reached 8% drawdown twice and 5% twice. All other drawdowns are below 4%. There's plenty of room to work on increasing profit while keeping risk low.
The insight I had was something related to coding, not a new strategy. I made the strategy about closing each trade independent of each other more efficient.
Below are some ideas I am currenly using on my EA, so you (or anyone) can have some ideas to apply on your own EA:
- Initial trades are not random, they follow a strategy. It is where the main profit comes from.
- Subsequent trades can be either a hedge or averaging. The EA will decide which option is better. (I gave up the idea where I was opening both buy and sell together)
- Each trade can be closed independently (sometimes my EA close old trades, because the lot sizes on those trades might be irrelevant if new trades have a lot size much bigger than the initial one)
- Trades can be closed at any combinations (2 buys, 2 sell, a buy and a sell, by groups of trades comparisons, etc). I think this is what makes the biggest impact on the EA. Also, it is the most difficult to code.
- I am multiplying lots using fibonacci sequence. While it might take longer to recover from a losing trade, the final result is a smoothlier recovery.
That for example, it's highly smoothed since last one ! These 3 points are particularly interesting.
1. Hedge when loss, average as a martingale ?
2. This one is very interesting, you're closing the buy 0.01 used for entry when you reached 1 lot after many orders, right ?
3. I'm doubtful about that one, it generates profits but it desequilibrates the whole system, you get out of the hedging logic, i guess that when it remains 2 sells, you'll open the buy needed for to hedge these 2 short right ?
20% a year ... between the two yellow it is 20% rafael in 3 days !!!
Then I changed the setting to see how it performs, the vps will soon expire & i didn't work on the code since last monday, I just glanced and commented what was happening on but ... those losses you are seeing on the two side of the red line, are caused by the issue we talked of higher, and this is the same issue, each costing 2*10%, with the same solution and an expectation of 40% + approx 20% in approx 6 days once solved.
I can't stand imagining something else than solving the problem in a way or the other - that said, i'm not a robot.
I will wait for inspiration, and your n°2 seems to me the most interesting to explore.
I was "playing" with hedging to explore possibilities : it's very tempting, since it allows purely & simply to recover from a bad position taken.
The risk of these strategies is well-known : lot management. Comes ALWAYS a point, where the margin is stressed, the logical solution being to accept & cut losses, often with bigger losses than normal if you retried many times.
Is there any way to get out of a failed hedge ? Have you ever seen such a method that could limit damages made by a failed hedged deal ? Overbidding ad vitam aeternam is definitively not the solution.
That's what I'm doing ... 2 as a multiplier, but not fixed lots, risk for the first order is 1%