Light martingale expert - gives good results (expert code attached) - page 11
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Actually, martingale is not a bad thing if you think about it a bit more thoughtfully. I've done a similar system for myself, but in a slightly different way.
Since we are reversing, we should look for a sharp movement of sufficient length, for example 80-100% of an average daily movement (to open the first trade). And this movement must occur within one day. Then the pullback will be almost inevitable, at least 23% of the initial movement (the minimal Fibo level...though 38% can also be tried following the trend). Well, if the movement continues against us, slowly build up volumes (preferably at some significant levels), and always move take-profits to the level of 23% against the rising wave. I.e. the length of each following take is gradually increasing. Thus, volumes should be calculated correctly to increase profit target proportionally to the length of swing with each new trade.
Just the basic idea is that the initial movement should be almost without fail (pullbacks at any point of it should not exceed 20% of the previous movement), this should be checked.
Of course, the presence and strength of a trend must also be taken into account. My best results of testing of such a system concerning profit/loss ratio are calculated with 23% for trend and 15% against the trend
What was good in the first case, is now a disaster.
In both cases we had a series of purchases in a downtrend. The last order in both cases probably didn't close the previous ones, because the Ishimoku gave a buy command. But the trend went upwards in the first case and reversed in the second one.
I am not good at programming and I have not found the answer yet. The question to Sart: Where is the error?
The reason is that when the eighth order (Order_7) triggers, the tenth most recent limit order (Order_9) does not open. This is shown by error 130 in the tester log (wrong stop) and, as a consequence, there is no modification of orders opened earlier (setting of new TP and SL). Therefore, only the eighth order (Order_7) will be closed when the price reverses at TP, the remaining orders will be closed as luck would have it, i.e., at TP or SL previously set when opening the seventh Limit order (Order_6), depending on where the price moves.
It appears so because when the next Limit order is opened, the parameters of the next order in the order sequence are used to set the SL level, i.e., in this case, to open the tenth Limit order (Order_9) we need the Order_10_Level variable which simply does not exist.
_OrderStopLoss [i] = _OrderOpenPrice[i] - TradeCycleDirectin * OrderLevel[i+1] * Point;
In my opinion, the situation can be improved by increasing the array to 11 or more and adding the Order_10_Level and Order_10_Lots variables, etc... Although, the "glitch" is not eliminated by this method in principle. It's just postponed until "better times"... :) The question of a prolonged small backward trend is still open.
P.S. I am a beginner in the field of trading, and programming is rather a hobby for me. Therefore, correct me if something is wrong.
Sincerely. Eugene.
P.S. I'm new to trading, and programming is more of a hobby for me. Therefore, correct me if anything is wrong.
I have made one inaccuracy. In the case of "bad luck", after Order_7 is closed, the next orders continue to be opened and the already open orders are modified. So, the entire order stack will be closed not by the SL set at the opening of Order_6, but with a much larger loss. However, it does not change the matter.
Regards. Eugene.
P.S. I'm new to trading, and programming is more of a hobby for me. Therefore, correct me if something is wrong.
Thanks for the tip. I'll keep it in mind for the future.
These values should be calculated in the program according to a certain algorithm, not just taken
The question is, why bother with a bunch of Order_..._Level and Order_..._Lots variables?
These values should be calculated in the program according to a certain algorithm, not just taken
Of course, but what algorithm is it based on? If I knew this algorithm, I would do so.
It is desirable that the total value of the Order_..._Level variables be commensurate with the amplitude of the small backfalls on the history of a particular symbol. Frankly speaking, the more you insure, the less profitable an Expert Advisor is.
Maybe you can float an idea, ..., and an idea for dealing with low-return trends.
It would be desirable that the total value of the Order_..._Level variables was commensurate with the amplitude of low-bounce periods on the history of a particular symbol. However, the more you insure, the less profitable the Expert Advisor is.
Except that both amplitude and period of these "low-bounce periods" are very variable :) And with good insurance (close to 100%) averaging technologies give annual average profit of about 10%. Almost like in a bank, but the risk is still higher :)