ALL ABOUT THE GRID STABILITY PLUS SEMI-AUTOMATIC EXPERT ADVISOR FOR AUTOMATIC AND PARALLEL MANUAL OPERATION

ALL ABOUT THE GRID STABILITY PLUS SEMI-AUTOMATIC EXPERT ADVISOR FOR AUTOMATIC AND PARALLEL MANUAL OPERATION

29 March 2020, 20:15
Oleg Papkov
0
283

Logo EA Grid stability plus semi-automat

Let's see what's what.

The Grid stability plus semi automaticEA works according to the following rules: initial trades in both directions are opened using the RSIindicator (the parameter of the RSIindicator in the start settings). Namely, when the indicator crosses the 70 level, opening short positions are closed by Take Profit, and Vice versa, when you reach level 30, open long positions which are also closed in a similar manner. If the position has a loss, then the averaging network is built, with a certain step step, the coefficient of lot increase CoefLot, and the coefficient of unevenness of the step of the averaging network ULcoef.

How does the averaging network work and why is it built?

If the position turns out to be set against the current trend, then if after a certain step of points at a loss put the position in the same direction as the previous position, then their break-even LPS will be located between them and closer to the position whose lot is higher. For the BUY direction, for example, this break-even L1 is lower than the break-even L1 of the first trade and closer to the existing price rate at that time. And the correction that has started may cross the break-even price of LSR and reach the level of LSR+TP, then the network will close with the planned profit. If the lot of the second transaction in the lot2 network is twice as large as lot1. Then we get a classic martingale. This is one. And the second thing is that the breakeven of the LSE will be much closer to the second position, which brings it closer to the exchange rate at that time and increases the probability of being closed when correcting with a profit, i.e. with Take Profit.

The number of knees in the network can be different. According to statistics, the main frequency of averaging in the network falls by 2-3 knees and then decreases by hyperbole. The existing settings of the expert Advisor give you a wide range of opportunities to build an averaging network:

CoefLot-changes the lot size in the network. If its value is equal to 1, then the entire network is built with one initial lot. The break-even LSR of such a network is far from the current exchange rate at that time. Any increase in the coefficient brings the LPS closer to the price of the exchange rate, which increases the probability of a correction to achieve a profitable closing of the averaging network.

The ULcoefcoefficient increases the step value in points from the previous position. If its value is equal to 1, then all positions in the network are opened in uniform increments. Otherwise, there is an increase in the step in ULcoef times. It is used for the same number of points where the network is built to use a smaller number of network knees, i.e. reducing the load on the Deposit.

If the position on the RSI indicator was opened in the right direction, it will be closed by Take Profit. If the market conditions have changed against the indicator and the direction of the position is not guessed, the expert Advisor builds an averaging network in accordance with the set settings and closes the entire network with Take Profit when the exchange rate is corrected. Moreover, in this case, the profit is higher, since the total lot of the network is larger than the lot of the original position.

Lyrical digression. :)

Why did I say that the direction is guessed-not guessed. Just "white noise", and the price movement is basically a mathematical concept of "white noise" (an example of white noise – listening to the radio in the absence of radio, to watch TV, did not find the channel or watch the end of the hose from which the high pressure jet of water arises; was this childish to run away or jump through a hose.) Only the Forex currency market has pure financial mathematics with its own laws. Technical analysis. That is, trends in different time frames. And there is our favorite news. Who likes it, who doesn't. Fundamental analysis. That is, it seemed to me that everything is much worse than"white noise". This is already, figuratively speaking on the example of the children's hose, the end of the schlang with the water pressure in the hands of children who are fighting for possession of the end of the hose.

And I came to the conclusion that this is all a fairly large "guess". The adviser is not smarter than me, he is a part of me. I can't exactly make 10 trades out of 10 correctly. There are false swings, insignificant movement, etc. All indicators seem to lag or repaint under the course. And I realized that the most accurate and fastest indicator is the exchange rate of the currency pair itself. Look at him. And again I realized, but this time that the transaction can be started at any time and in any direction when using the averaging network. Or better, a couple in different directions. You give a stop loss on-more and one ends in one place, with a reasonable take profit. And the other is in the other.

But this is not "Thank God"either. Suddenly intervenes or appears on the market, a strong enough almost recoilless trend in some direction and with the inequality of take profits and stop losses, I am at a loss on every third pair of transactions. Moreover, the total profit is equal to the total loss. The loss of time and nerves, well, that is not the loss of money. Thought. What if we ignore these stop losses ?

I forced the adviser to build a network of deals in the direction of the first unlooked-for one, but with a larger lot. N trades with an increasing lot, move the total breakeven price to a pullback. The price of the symbol inevitably changes direction and the former unprofitable deal with a large lot turns out to be profitable and the entire network that accumulated a large total lot is closed by take profit. The profit is more than if you guessed right.

By the way, an interesting thing. The market maker, or rather the liquidity provider for us, so that we can practically instantly buy or sell the base currency of our instrument, just constantly and stably works mainly against the trend. Just over the averaging network.

Example. We have seen an upward trend. Quickly buy. The liquidity provider sells us quickly.

Further, if the trend is up, we will buy more. They sell it to us. But they are not fools sitting there, trading at a loss.

In short, at the very top of the trend, the liquidity provider accumulates a large lot of what is sold to us. That is, against the market. His task is to turn the market to us at a loss - to himself at a profit with pending orders and huge lots. And since it has a huge lot down at the top, at the end of the trend, it just scares us to its breakeven band, and then it takes Profit. Feel it. As we have with the use of the network averaging.

Market-maker




Well. It turns out that in any direction, make a deal – you are in profit. This is the mechanism.

Our adviser works with such constructions in both directions simultaneously, hedging itself, purely statistically.

I looked at the work of the adviser with different steps and lot increments and understood. The adviser thus covered the technical analysis, so to speak. Networks. Especially in the flat.When working with the adviser on M15 and if H4, D1, MN1 is assumed to be flat, you can narrow the network step for a while, for more earnings. Make the settings seem more aggressive.

Yes. And, there are still fundamental analysis-news and a strong recoilless rare trend-currency intervention.

After the 2008 crisis, I realized that the price movement, even at this time, almost always had pullbacks, that there are no working trends, even if sharp, to be afraid of. And I also realized that news like Brexit for the GBP and currency interventions are the most "evil aunts" on the market for our adviser. :)

I tested the adviser for the year 2019, giving him a decent amount of money to start with, and saw that a solid drawdown occurs 3-4 times in 2019. These are the "evil aunts".

4 divided 260 (the average number of trading days per year) and the probability of trouble was 0.015. Going out on the street , in my opinion, the probability of some unpleasant event is sometimes higher. So what? Don't go outside.

In case of such troubles, I made a lock in the adviser. Automatic by MarginLevel level. Equalizing lots in both directions until better times. In short. I made the "Lock" button so that the trader could do it at will in any situation.

By the way, the buttons in the tester do not work.

Semi-automatic operation.

On the Demo or in reality. Made buttons for opening pending orders. Buttons for manually opening deals. Copies of the manual lot set for pending orders or just trades. Info button about the account and symbol properties.

Yes. Everything that is entered manually has the same properties as automatic ones. This means that the adviser will process them. And if you work with the adviser in semi-automatic mode, then in order for the adviser to process trades that have been placed manually, they need to be set not using the terminal tools, but using the tools of the adviser itself.

And I did and added , in my opinion, a very important thing for such trading tactics

When there are resources and the need to manually move the breakeven to the beginning rollback, making a deal at the current rate, but you need to know the lot that will move the breakeven line plus Take Profit to the right place.

Put the buttons in the directions. Clicking on them-you get a line. You move to the right place, and above it is a number indicating the lot. And as soon as the funds in the account for the proposed transaction are no longer enough, the numbers change color to red. Very useful thing for the chosen tactics.

Changing the step, going through different parameters, I came to a conclusion. That the grid design is somehow scaled . With a step of 60 on EURUSD M15 and a Deposit of 5000, this is an adequate daily mode. And earnings 10, 13, 17. 50 trades per day. 60 minutes*24 hours=1440 minutes divided into 50 trades = 28 minutes and a deal. 50 trades multiplied by lot 0.01-0.5 lots per day. 2 days and 1 lot. Earn rebates. At step 300 and the minimum lot, you can forget about the adviser for years.

A joke, of course. Earnings, of course, are small.

Turning the skewer. And finished playing. Accidentally set the grid step 2 and left the game time from 19 GMT to 20 enabled. And launched it for testing. With a large amount of money, a small step and an hour of presence on the market. See. Daily earnings of 30,000 per day, 20,000, 15,000. Well, I think that's it. That's right!

 

(End of the lyrical digression.) More about the adviser.

Building an averaging network puts a load on the Deposit, so you need to choose settings based on the Deposit at the moment.

All transactions in the network have a collective one for all Stop Loss and Take Profit, which are dynamically modified, depending on the construction of the network and exist for those cases when there is no connection between the MT4 terminal and the broker for a long time.

By the way, a not too large total Stop Loss can close the entire network if it starts to grow very sharply in a loss-making direction. So that it does not stretch to a huge number of transactions against the market.

Happen again. It is possible to place pending orders with the same magic numbers, i.e. after turning them into deals, the adviser will serve them considering them their own.

There is an interesting possibility of manually moving the red breakeven line+TP or the blue one. Namely, by pressing the Move Red key, for example, if there are SELL deals in the averaging network greater than 0, a long red line will appear, which can be moved to the current price, and next to it a number showing the lot that you need to make a deal at the current price, so that the small red line of breakeven +TP can move to the position of the long red line, set by us.

In other words, the adviser, working automatically, gives the trader a full opportunity to control the situation.

The expert Advisor's interface.

The adviser is equipped with a status display and buttons for managing the adviser and the situation.

In the upper-left corner of the tool window, there is an information window (not a button)with the name Info. Based on the Stochastic and MA indicators, if their directions coincide or do not match, an assumption is made and the prevailing trend is based on the calculation that Stochastic has values (55,7,20), and MA – (104,0, Linear Raised, Close). The blue color of the window suggests the presence of an uptrend, light brown-a downtrend, gray – the presence of a flat (divergences in the direction of indicators). The corresponding labels inform you about the trend in the same place, just above, in the upper-right corner.

MinMargin Level %- indicator of the minimum margin level during the continuous operation of the adviser.

EquityDDBUY, EquityDDSELL-indicator of the minimum levels for Equity, that is, the maximum drawdowns in the directions during the continuous operation of the adviser in the Deposit currency.

SELL, BUY– current profit/loss on open positions by direction.

Income. $.- profit/loss from the continuous operation of the adviser.

number of bends BUY, number of bends SELL– the number of nodes(knees, deals) in the network executed by the broker.

LotBUY, LotSELL– total lots of all open positions by direction.

The difference in lots– the difference in total lots by direction (LotBUY-LotSELL).

GMT.– the date and GMT time.

There is no time limit.– indication of the time-limited activation status. (in this case, there are no restrictions)

Numbers in blue, white, or brown indicate profit or loss on closed positions for the trading day.

On open account (not tester) mode EA online (in the tester – not working, restrictions developer MetaTrader 4.0) work button located middle left in the instrument box with an Advisor.

Info Button- when the mouse cursor is pressed on this button, comprehensive information about the current account and the selected instrument is displayed in a separate window.

Pending order button. When the mouse cursor clicks on this button, a yellow line appears, which should be moved to the price of the upcoming position at the price (opening) of a pending order with a magic number processed by the machine, the expert Advisor. Then click the appropriate button for the selected order type. (BuyStop, BuyLimit, SellStop, and SellLimit buttons).

OpenBUY and OpenSELL buttons-buttons for opening positions in directions with magic numbers set and processed by the expert Advisor. Open the lot, which is set using the buttons to the right, on the micro-tableau for installing the lot manually.

Locking button-button for setting closing (hedging, locking) of positions by lot. Namely, when you click this button, the adviser calculates the imbalance in the lots of open positions in the directions and opens a deal at the current rate in the direction of the smaller total lot and the lot reduces the difference to zero. In other words, a loss in one direction when the price moves is equal to a profit in the opposite direction. In this state, positions can be maintained for as long as the direction Swap that accumulates over time allows.

Move Blue, Move Red buttons-use these buttons to find out which lot to make a trade at the current rate at that time, so that the red or blue breakeven+Take Profit line is moved closer to the rate to the place of another horizontal red line, with which the trader, after clicking on the corresponding direction button, can specify the price where to move.

In simple words, if you click on the Move Red button, for example, the red line that appears indicates the price where we need to adjust the breakeven (also a red line, but short). We will see the number of lots that need to make a trade at the current rate and the breakeven in the down network will move to the place of our long horizontal red line that we moved. Thus, taking a risk, a trader can substitute breakeven +TP almost at the rate for closing a network of short trades with profit, built against the trend under correction.

 

 

The settings of the EA:

The EA can be configured in a very wide range.

MAGICB-magic number Long;

MAGICSis the magic number Short;

Section " trading Hours"

Hours_to_GMT_Offset- the known clock of the  time offset from GMT.

Hours- if true, the EA trades from the hour set by the Begin_hour parameter (GMT) to the End_hour hour (GMT). If false, it trades constantly.

Begin_hour-start hour (we are talking about initial transactions);

End_hourhour of the end (we are talking about the initial transactions);

The "Start-up settings" section"

Deals- number of initial deals at once;

MaximumRisk-regulates the starting lot of initial trades. The set lot of initial transactions depends on the balance of funds on the Deposit;

LotStop-lot limiter in the range from MinLot for the selected account to MaxLot. Limits the growth of the lot of initial transactions of the network, which occurs depending on the Deposit and the value of the MaximumRisk parameter. After reaching the LotStop value, the network's initial trades will save this lot value

LotForManual– initial lot value for trades that will be set manually. This parameter can be changed during the EA operation using special buttons in the window of the EA operation tool.

DecreaseFactor-parameter for reducing the lot of initial deals;

TP-take profit in points from the opening price or breakeven level;

CoefLot-the coefficient of increasing the lot when increasing the knees in the averaging network. If 1 lot is not increased for subsequent transactions in the network, a value greater than 1 or much greater than 1, that is 2-5 and more and combined with the decrease in the value of the Step parameter to values 3-8, as well as in combination with increasing the MaximumRisk leads to a significant increase in profit per unit time, but also increases the risk of the event of Margin Call and Stop Out. These are aggressive parameters. Can be used in a night game (Hours = true; Begin_hour = 20; End_hour = 4) or in a quiet market. We recommend making regular withdrawals from your account. On the contrary, if this parameter is close to 1, the Step parameter is within 50-250, for example, and the MaximumRisk parameter is significantly reduced, from 0.01 or lower, in this case, the profit per unit of time is small, but the adviser almost ceases to feel the news with its unpredictability and currency interventions with a large difference in price. Passive parameters. All modes are set by selecting parameters and optimizing them for specific requirements and deposits;

RSI-period of the RSI indicator. If the indicator is greater than 70, the direction Short is selected, if less than 30, - Long;

Step-the step in points between the knees (deals) of the averaging network;

OnOffUnLine-if true, the mode of uneven increment of the averaging network step is enabled.

ULcoef-step increment coefficient of the averaging network;

 

Modes forced choice of the direction

SELL- if true, the SELL direction is allowed;

BUY- if true, the BUY direction is allowed;

Restriction parameters

LotMax-limit of the maximum lot that the adviser can use in the process of building networks.

OnOffLock-if true, Margin Level restriction mode is enabled. If the Margin Level falls below the LockLevel value during the adviser's operation, the adviser calculates the total lots by direction. Calculates the difference up to lot parity and sets the deal in the direction of the smaller total lot with a lot equal to the difference, thereby setting the state of lot parity, the so-called locking. That is, the loss of one direction is balanced by the profit of the other. The expert Advisor stops any actions, leaving the trader to handle this possibly dangerous situation himself;

LockLevel-limit level for the Margin Level value;

AxelOption-enabling restrictions on averaging network construction, namely the actions of LimLossMoney and MinPauseBegin settings ;

LimLossMoney– if the loss in the direction reaches the amount set in this parameter, the network is closed with such a loss, after which there is a pause in opening the initial transactions ;

MinPauseBegin– the number of minutes of pause after this close before starting the initial trades;

MinPauseNetUp– the number of minutes of pause in opening any positions in the UP direction;

MinPauseNetDn– the number of minutes of pause in opening any positions in the DOWN direction;

OnOffStopDeals-enable / disable the mode for limiting the number of knees (deals) in the averaging network;

StopDeals– the maximum number of positions in one direction when building an averaging network;

CloseDeals-whether to close positions when the maximum number is reached when the limit is reached, or just leave them, but no longer put them;

BW-color correction for the black&white window mode.

DelObj– if true, when deleting the adviser in the window, all objects of the adviser are deleted.

TrailingStop and TrailingStep-trailingator parameters.

 

Lines:

The blue horizontal lineis the breakeven level plus the Take Profit direction UP.

The blue line on top of the blue line is the level of setting the next trade UP with profit and correct direction selection.

The blue line at the bottom of the blue line is the level of setting the next trade UP in case of loss and incorrect direction selection.

The red horizontal lineis the breakeven level plus Take Profit in the DOWN direction.

The brown line at the bottom of the red line is the level of setting the next trade DOWN when profit is made and the direction is chosen correctly.

The brown line on the top of the red line is the level of setting the next trade DOWN in case of loss and incorrect direction selection.

Examples of selecting settings:

Since the expert Advisor has a fully automatic component, which according to the selected settings can work without the trader's control, and the possibility of parallel manual work, the trader can help the adviser to trade with competent actions. The peculiarity of this type of expert advisors is that if the trader absolutely illiterates the initial trades, the algorithm will have to bring them to close with a profit. This is a very good opportunity for novice traders to practice on cent accounts with small lots of initial transactions. "Put the deal at random-adviser" will take out!»"( At your expense).

Another interesting feature of the settings is the choice of a small trading time interval(for example, night trading hours), but with increased risk , a large value of the MaximumRisk parameter, a small step step, and an increased (significantly greater than 1) CoefLot value . If the settings specify the hours from hour X to hour Y, then after an hour, the Initial transactions will not be set, but the adviser will finish building open networks until they are completed with a profit. The LotStop and LotMax values also need to be raised. And do all this on the assumed flat on the weekly or daily timeframes. In other words, an adviser with such aggressive settings earns much more. But this is also a risk.

Opposite. If all the above parameters are removed from the aggressive zone. Make the Step step large, and reduce the LotStop and LotMax values to close to the minimum. To Reduce MaximumRisk , CoefLot . Increase the ULcoef coefficient to 1.5-2. Increase the distance in minutes between transactions in the MinPauseNetUp and MinPauseNetDn networks, so that there are no "crazy" deals on the same candle, on the news. Leave time limits on trading. Then the profit will grow slowly, but the security of the Deposit will increase significantly. We can talk about an analog of a Bank Deposit with interest, only with a high yield.

The presence of trainingfor with default settings. Slightly special trailing. Trailing above the breakeven level+TP above the set TP value, which increases the profit in some cases.

No one prevents the trader from using the standard MT4 terminal trailerator.

 

The EA has built-in control and reaction to the minimum MarginLevel level and its proximity to the Stop Out situation. If you enable automatic position locking mode with The true parameter, event processing is enabled when MarginLevel reaches a level lower than LockLevel. As a result, the difference in total lots in the directions will be calculated and a locking transaction will be opened with a lot equal to the difference and in the direction of the smaller total lot.

This situation, when the profit of one direction will be equal to the loss of the opposite direction, will stop the adviser's activity until the trader makes a decision.

The adviser has built-in restrictions on certain actions. Namely. AxelOption-enabling restrictions on averaging network construction, namely the actions of LimLossMoneyand MinPauseBeginsettings ;

LimLossMoney– if the loss in the direction reaches the amount set in this parameter, the network is closed with such a loss, after which there is a pause in opening the initial transactions. This is a limit on the loss in the Deposit currency. This is done at the request of clients who believe that this function is necessary to overcome adverse events in trading by partial loss. MinPauseBegin– the number of minutes of pause after this close before starting the initial trades. This item is entered in order to specify the duration of the pause in minutes.

OnOffStopDeals-enable / disable the mode for limiting the number of knees (deals) in the averaging network. In other words, you can use this mode to regulate the number of transactions in the network. If you do not delete existing deals that are limited by the StopDeals parameter, but leave them in accordance with the CloseDeals=false flag, but do not increase them any more, the network will degenerate into an ordinary "sit-out". If CloseDeals=true, the network in the direction will cease to exist at a loss.

StopDeals– the maximum number of positions in one direction when building an averaging network.

CloseDeals-whether to close positions when the maximum number is reached when the limit is reached, or just leave them, but no longer put them.

Developer page:

https://www.mql5.com/ru/users/novocel_ol

 Developer site:

https://forexolreal.ru/en

Adviser's page

https://www.mql5.com/ru/market/product/47731


Share it with friends: