Cobra Night - Expert Advisor for deposit acceleration in 100$
Martingale - consecutive increase in the size of the transaction after the loss. The tactic is based on the properties of market assets - regardless of the trend direction, aim for the average value.
Martingale attracts beginners by the simplicity of the theory and practice of application, and by the profit on flat positions, when the price fluctuations do not go beyond certain price limits. Losses on trends - directional movements - "kill" the martingale trader's deposit.
How to adapt the Martingale strategy to the market of financial instruments?
A trader suffers a loss on Martingale because of the "early entry" before the trend reverses and the lack of knowledge of the exit point from open losing positions. Let's see how the Cobra Night Expert Advisor deals with this. It should be said that this robot is quite has long been discussed on our forumand does not lose relevance. It is in open source, the participants propose new and new sets to it, refine and adapt.
So, entry and exit points in the Expert Advisor are determined by the non-linear adaptive moving average model of Kaufman. The author of Cobra Night calculated two non-linear coefficients, capable of determining the flat and trend mode of the market, "switching" the moving average from small (fast) to long period. It allowed filtering false signals on the flat, "moving away" the moving average from the price fluctuations and bringing it closer to the trend.
In the picture Kaufman's moving average (KAMA), which is shown in red, has the same period as the ordinary moving average (MA). During the flat period KAMA "lags" behind MA which gives a lot of false crossovers with the price, supposedly signaling a new trend, while during the directed movement of the quotations both curves coincide.
The general principle of the Cobra Night Expert Advisor
Advisor Cobra Night uses the KAMA switch mode as a trigger, putting trades on the flat and closing on the trend (at a loss or profit, depending on the direction). Thus, two modifications of Cobra Night Expert Advisor help:
- to open transactions in a "quiet market" when an unexpected "impulse" of trend continuation is excluded;
- determine the entry point (Flat after the trend in 70% cases shows a reversal or pullback);
- Close trades with a small loss - the trader often does not know where and when to fix the loss from many open trades, Cobra Night Expert Advisor answers unambiguously - on the continuation of the trend;
- work profitably on all timeframes and market instruments.
Description of the algorithms for creating a Martingale grid of the Expert Advisor
The Cobra Night Expert Advisor works in four modes:
- pyramidBuying on the trend - recognizing the trend on the KAMA trigger, Cobra Night Expert Advisor opens a grid of orders in the direction of price movement, increasing the lot size with each profitable new trade.
Positions are closed when the trend changes:
- countertrend: if trades in the trend are closed or it is not recognized, after the KAMA trigger changes from trend to flat, the robot opens a grid of orders directed against the current movement.
Opening trades using the Pyramid system.
Positions are closed at the beginning of the trend in either direction, if the trigger shows an exit quotes out of the flat.
Cobra Night Expert Advisor is implemented completely in automatic mode with preset settings in preset files. Experienced users have the opportunity to make global changes in the algorithm in the settings of the robot.
Cobra Night Expert Advisor Settings
The Cobra Night settings window in the "Input parameters" tab allows you to change the service and trading functionality of the strategy.
The GMTMode and GMToffsetManual blocks take into account the time offset of the terminal, relative to Greenwich Mean Time (GMT).
By setting the GMTMode block to AUTO (in the example shown in Manual), the trader will not need to calculate the time offset GMToffsetManual - the Expert Advisor will determine it independently.
Setting block:
- UseWorkingTime - true value will allow Cobra Night to trade in 24/5 format.
- TimeStart - set the start time of the Expert Advisor.
- TimeStopNewOrder - time limit for opening new orders. The robot will close the old orders by itself.
- TimeStop - the cut-off time after which all trades are closed.
- UseTradeType - setting the automatic or semi-automatic mode.
- UseOrderType - mode of placing orders. The Cobra Night Expert Advisor calculates price levels for which it places orders of two types: pending (immediately after calculation) and on the market - after the quotes have crossed the calculated levels.
- PeriodForPendingOrder - time interval between orders opening. The default value is in ticks. This allows you to quickly build up and close a position, literally, "within a candle".
- PipsStep - grid step. The step corresponds to the minimum change in price value in the Metatrader (the last digit), so for four-digit accounts it will be 1 pip, for five-digit accounts - 0.1 pip.
- MaxOrders - the allowed maximum number of orders.
- Distance - the distance from KAMA to the first order opened after the mode change. The parameter is measured in pips, use the value of average volatilityto calculate the deviation for each timeframe.
- KAMAPeriod, FastMAPeriod, SlowMAPeriod - Kaufman moving average settings.
- ProfitCoeff - total takeprofit at which the grid of orders will close.
- CloseAtMidnight, MidnightProfitCoeff - closing orders by profit condition at midnight, to avoid swap.
- UseMartingale - simple grid mode without increasing orders or Martingale tactics.
Cobra Night Expert Advisor settings include: fixed lot or reinvestment mode, an algorithm for increasing orders by arithmetic or geometric progression, risk ratio and a color scheme for displaying the Kaufman curve and order colors on the chart.
Risks of the Cobra Night strategy
- Tools - High volatility and unexpected trends lead to undesirable drawdowns. The trader should avoid USD/JPY, gapped CFD stocks, and illiquid instruments. Technical assets and cross rates show some of the best results with this strategy.
- Trading hours: The ideal is the Asian session with no news in the economic calendar.
- Settings and optimization - Stick to the basic settings, do not use the function "optimization" in the tester, remember that the best is the enemy of the good, and there is no limit to perfection.
Cobra Night Expert Advisor Test
It only remains to see the Expert Advisor in action. Let's test Cobra Night on an hour timeframe of EUR/USD with preset default settings. You can find them at the end of the article. In one of the topics of our forum was a question about a robot that can help you speed up a small deposit of $ 100. The answer advised this particular Expert Advisor. Let's see how true it is.
As we can see, in less than a month, Cobra Night has increased the deposit 4.5 times. At the same time, the profitability indicators are several times greater than the loss. The maximum drawdown of 21.5% is, of course, unpleasant, but for Martingale is essentially nothing.
We would, of course, advise to keep a very close eye on the accumulated drawdown of the robot and optimize it not only after the declared drawdown level is reached, but also when there is a clear change in market activity. It is also worth suspending the Expert Advisor during the excitement over strong news and over the weekend to avoid getting hit by Monday's gaps.
I tried to run the Expert Advisor on a demo and set it on EUR/USD. The settings are standard. I checked with your set. But, on this pair, the owl has lost the deposit - from $100 I have only $18 left. What do you think, this pair is not really suitable for this EA or the owl needs to be adjusted for this pair... Share your secrets, how did you manage to make it work on this pair in the open? I would be very grateful to you! I can't attach the file with my set because I have the owl on my PC with remote access - it has some troubles with file transfer.
P.s. For the test I used one of the latest modifications of the Expert Advisor, which the author posted in his forum branch (indicated in the link).
Here is the result of the test on the demo.
Tell me please, on what quotes did you test the Expert Advisor?
A one-month testing period for a martingale is completely insufficient.