VR Smart Grid is a multi-functional expert advisor for the MetaTrader 4 and MetaTrader 5 terminals that allows you to trade using order grids. The algorithm of the expert advisor allows you to trade both with the trend and against the trend. Trading with the trend is structured in such a way that each new order is opened only if the previous order has a Stop Loss in the profit zone. Trading against the trend is conducted in order to close unprofitable positions with a profit. The advisor has a large number of settings that allow you to conduct conservative, aggressive or scalping trading of financial instruments. The first version of the expert advisor was written in 2009. the program is constantly being improved and upgraded.
>Advantages of the VR Smart Grid adviser
Easy to configure
Suitable for beginners and professionals
It can work with any financial instruments (Forex, Crypto, CFD, Futures, Metals)
It can be optimized in the strategy tester
It can trade on any time periods
It has multiple modes of trading: with the trend and against the trend
It has multiple averaging modes, including smart and partial averaging
The expert advisor automatically takes fees and swaps into account
Unlike other expert advisors that use the order grid trading method, VR Smart Grid can simultaneously trade for buy and sell, use trailing stop for orders, and calculate trading lots using multiple algorithms.
Depending on the chosen trading strategy, the expert advisor can trade constantly without waiting for signals from the trading strategy, or it can wait for a signal from the trading strategy, and the signal can be applied both to the beginning of trading and to subsequent orders. The EA trades using the order network method.
If the price goes in a profitable direction after opening an order, the VR Smart Grid expert advisor will use the break-even trading method using a Trailing stop. (The movement of the stop loss to the profitable zone in the wake of the price). When the profit condition is met, another order with the same lot as the previous one will be opened for the order in the same direction. In this way, the expert advisor will try to use trend trading as efficiently as possible.
If the price goes in a losing direction after opening an order, the EA will automatically open averaging orders in order to close all current orders as quickly and profitably as possible. Depending on the EA settings, averaging orders can be opened with a fixed minimum lot or with a constantly increasing lot.
The expert advisor has unique methods for calculating prices, in which the trading algorithm can quickly reduce a losing position and increase profits on profitable orders. Partial closing occurs in virtual mode, which means that Your broker will never see the price at which the EA will close orders.
Unlike other expert advisors that use the order network trading method, VR Smart Grid can simultaneously trade for buy and sell, use trailing stop for orders, and calculate trading lots using several algorithms.
The profitability of the VR Smart Grid expert advisor was determined and achieved using the optimizer built into MetaTrader 5, since the quality of optimization, the quality of historical data is several times better than in MetaTrader 4. All settings can be applied to the MetaTrader 4 and MetaTrader 5 terminals.
For the VR Smart Grid expert advisor, a long-term optimization was performed in the MQL5 cloud network. The most effective settings were made default settings in the expert advisor on the date of the expert advisor publication. Below are a few reports made on the default settings.
Conduct testing in conditions as close to real as possible.
Use demo accounts for tests.
Conduct testing for at least 2-4 business weeks
Use a VPS server, this will allow the expert Advisor to work efficiently 24/7
The program settings allow you to run multiple copies of the adviser in one terminal
Do not allow yourself to take big risks, use a small Deposit
Any .set files check on tests
Testing the adviser in the strategy tester will not give you any guarantees, use only demo accounts
Do not leave the adviser to work 24/7 on a real account, always monitor the work of the adviser
Adjust the settings if necessary
Lot calculation Settings
Lot calculation type - selection of the lot calculation type for the first starting order.
Fixed lot - the lot remains unchanged.
Lot based on a percentage of the balance - the lot increases depending on the growth of the deposit balance.
Fixed lot or percentage value - depending on which parameter is selected in the "lot calculation type" setting, for a "fixed lot" you have to specify the lot value, for example, 0.01 or 1.26, for "Lot based on the percentage of the balance", you have to specify the percentage, for example, 0.5 or 5. By entering the value 5 in the field, the expert advisor automatically calculates the lot based on 5% of the deposit, if the deposit is $100,000, the lot will be 5% - $ 5,000, and the lot value will be 21.65.
Lot calculation type (calculation for orders) - this setting allows you to choose a lot management strategy for new orders that open in the network against the trend.
Start lot - the lot remains unchanged, for all orders, the lot specified in the "fixed lot or percentage value" setting is used. Example: (0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01)
Martingale lot - the lot is calculated from the formula, the lot of the previous order is multiplied by 2. Example: (0.01, 0.02, 0.04, 0.08, 0.16, 0.32)
Fibo lot - the lot is calculated based on the principle of Fibonacci numbers, each new lot is equal to the sum of the previous two lots. Example: (0.01, 0.01, 0.02, 0.03, 0.05, 0.08, 0.13 )
Sum start lot - the lot is calculated by adding the lot specified in the "fixed lot or percentage value" setting and the lot of the last open order. Example: (0.01, 0.02, 0.03, 0.04, 0.05, 0.06)
Up lot + Dw lot - the lot is calculated by adding the lots of the first order and the last one. Example: (3+,4,7,10,13,16,19)
Maximum allowed lot for purchases - the setting limits the maximum lot. If, as a result of calculations of the lot management strategy, the lot is larger than specified in the setting, the expert advisor will open an order that does not exceed the value specified in the setting.
Maximum allowed lot for sales - the setting limits the maximum lot. if, as a result of calculations of the lot management strategy, the lot will be larger than specified in the setting, the expert advisor will open an order that does not exceed the value specified in the setting.
Averaging order settings
Order averaging type-this setting allows you to choose a strategy for calculating the average price, when it is reached, some orders or all orders will be closed.
Average all orders against the trend - the strategy calculates the real Take Profit levels for all orders. All orders are set to a real take profit, which is recorded on the broker's server and in the trader's terminal.
Average two extreme orders against the trend - the strategy calculates the real Take Profit levels for the two extreme orders. The order with the highest opening price and the lowest opening price is taken into account.
Average the last two orders against the trend - the strategy calculates the real Take Profit levels for the last two orders. The last two orders opened by price and time are taken into account.
Smart averaging, selection of the most optimal averaging - the strategy analyzes the previous three strategies "Average all orders against the trend", "Average two extreme orders against the trend", "Average the last two orders against the trend" in order to calculate and find the price that is as close as possible to the current market price. The closer the average order price is to the current market price, the more likely it is to close some orders with a profit and reduce the position against the trend. The strategy works constantly with each change in the position of orders, and the levels are recalculated with each change in the number of orders. Real Take Profit levels are used for orders.
Partial averaging of all orders against the trend - the strategy works similarly to the "Average all orders against the trend" strategy, with several differences. 1 - a virtual Take Profit level is used, which allows you to hide your levels from the broker, 2 - the average price is calculated not for the entire lot, but for the part of the lot specified in the "Percentage of closing part of orders in the network" setting. If the order uses lot 1, and the setting specifies 50 percent, then 0.5 lots will be used to calculate the average price.
Partial averaging of extreme orders against the trend - the strategy works similarly to the "Average two extreme orders against the trend" strategy with several differences. Virtual Take Profit levels are used, and parts of lots are used to calculate the closing price.
Partial averaging of the last two orders against the trend - the strategy works similarly to the "Average the last two orders against the trend" strategy with several differences. Virtual Take Profit levels are used, and parts of lots are used to calculate the closing price.
Do not use averaging against the trend - the strategy excludes calculating average prices and closing orders based on total prices or total Take Profits.
Percentage of closing part of orders in the network - sets the percentage for closing part of orders, applies only to the strategies "Partial averaging of all orders against the trend, Partial averaging of extreme orders against the trend, Partial averaging of the last two orders against the trend".
Order type settings
Trade type - the setting allows you to select the type of trade and the direction of trade.
Simultaneous trading of buy and sell orders-this setting allows you to enable full automatic trading of buy and sell orders.
Buy-only trading - the setting allows you to enable buy-only trading, initial sell orders will not be opened, and sell orders opened before the setting is enabled will remain under the control of the expert advisor and will be closed according to the "Smooth stop of sell trading" principle
Trade orders only for sale-the setting allows you to enable trade only for sale, initial buy orders will not be opened, buy orders opened before enabling the setting will remain under the control of the expert advisor and will be closed on the principle of "Smooth stop of buy trading"
Smooth stop of buy trading - the setting smoothly completes the strategy of buying a financial instrument. Enabling this setting does not mean that purchase orders will no longer be opened. The advisor will continue to work normally until it closes all purchase orders. After all purchase orders are closed, no new orders will be opened. Trading for sale will be conducted as usual.
Smooth stop of trading for sale - the setting smoothly completes the strategy of selling a financial instrument. Enabling this setting does not mean that sell orders will no longer be opened. The advisor will continue to work normally until it closes all sell orders. After all sell orders are closed, no new orders will be opened. Trading for the purchase will be conducted in the normal mode.
Smooth stop of trading for all types of orders-the setting smoothly terminates the work of the expert advisor. Smooth completion does not mean that the advisor will not open new orders. The advisor will continue trading until it closes all orders.
Picking up manual orders (Magic number = 0) - this setting is intended for manual trading. The trader decides when and which order to open. In this mode, the advisor controls orders opened by the trader and in case of incorrect entry by the trader's hands, the advisor's task is to eliminate the "Bad entry" with minimal profit.
Maximum number of buy orders against the trend - this setting limits the number of buy orders opened against the trend.
Maximum number of sell orders against the trend - this setting limits the number of sell orders opened against the trend.
Step between orders settings
Step between orders in points - the setting sets the distance in points between the open order and the order to be opened.
Increase the step by the specified number of points - the setting increases the value specified in the "Step between orders in points" depending on the number of orders by type.
Settings for managing your balance
Minimum profit for closing orders in points-the setting sets the minimum profit value in points that should be received when orders are fully or partially closed.
Close all orders when profit is greater - this setting allows you to close all orders if the total floating profit has reached the specified value. The profit amount is indicated in the deposit currency. Example: (100)
Close all orders if the loss is greater - this setting allows you to close all orders if the total floating loss has reached the specified value. The loss is indicated in the deposit currency. Example: (-100) Minus is obligatory.
Full stop of trading or with resumption-the setting allows you to either completely stop the expert advisor's work on the trading account after the "Close all orders with more profit" or "Close all orders with more loss" is triggered, or resume trading after all orders are closed. The strategy type is selected in the settings below.
Full stop without resuming trading - the setting will tell the trading program to close all orders and stop trading. Trading with the expert advisor stops regardless of whether the Auto trade button is pressed in the terminal or not.
Full stop of the expert advisor and continue trading - the setting will tell the trading program to close all orders and resume trading.
Trailing stop settings
Trailing stop for trend orders - the setting enables the trading strategy of the expert advisor based on the trend. Depending on the specified value, the trading algorithm will move the real stop loss level to follow the price at the distance specified in the setting. When the distance between the Stop Loss is greater than or equal to the specified value, a new trend order will be opened.
Trailing stop for orders against the trend - the setting enables a trading strategy for trading using a Trailing Stop against the trend. Moving the real Stop Loss level to follow the price will only occur for orders opened against the trend.
Trading time stop settings
Use a new bar to open a position-this setting allows you to tell the program to open a new order based on the "Step between orders in points" setting and when a new bar appears. Orders will be opened on a new bar with an offset of 5 seconds to avoid falling into the over-active period of calls to the broker's server.
Disable the expert advisor for a while? - The setting tells the program to control the set trading time specified below.
Time when the expert advisor stops working - the time when the expert Advisor stops opening new orders. At the same time, the expert advisor continues to work with orders that were opened earlier.
The time when the expert advisor resumes trading is the time when the expert advisor resumes opening new orders.
Trading strategy signals settings
Trading strategy signals from indicators - the setting allows you to choose a trading strategy based on indicators or non-indicator trading.
Do not use indicator signals - the trading strategy is based on the absence of orders. If there is no order or the order was closed, the advisor will open a new order.
The CCI indicator signal - a strategy based on the CCI indicator. An indicator with a period of 20 is programmed in the expert advisor. the signal to open an order occurs if the CCI indicator value crosses the 100 and -100 levels.
Donchian channel indicator signal - a strategy based on the Donchan channel, an order is opened when the price crosses the channel border for a breakout. Buying occurs if the price passes the upper level, selling occurs if the price falls below the lower border of the channel.
Moving Average indicator intersection - a strategy is based on the intersection of moving averages. The indicator periods can be specified in the settings below. For a fast moving average, "indicator Period 1 Period PTP", for a slow moving average, "indicator Period 2 Target Factor PTP". A buy order is opened when the fast moving average crosses the slow moving average from the bottom up. A sell order is opened when the fast moving average crosses the slow moving average from top to bottom.
Custom signal - the strategy allows the trader to transmit a signal from any other indicator or expert advisor. The signal transmission method is very simple and is based on global variables of the MetaTrader terminal. In order for the expert advisor to open a buy order, you need to pass the value 1 through the global variable named "SignalBuy". to sell, you need to pass the value -1 through the global variable named "SignalSell". Any other value passed through global variables is ignored. GlobalVariableSet ("SignalBuy", 1); - Transmitting a buy signal. GlobalVariableSet("SignalSell",-1); - Transmitting a sell signal.
Your PTP signal-a Signal based on the PTP indicator, Set the indicator period "indicator Period 1 period PTP" set the second value "Indicator Period 2 Target Factor PTP", buffer number for growth "Indicator buffer number for purchases", buffer number for purchases "Indicator buffer number for sales".
Use signals for the start order or for all orders against the trend? - this setting tells the expert advisor to apply signals only to the first orders, when there are no orders at all in the terminal, or to open all orders based on the signal.
Indicator period 1 Period PTP - the setting for fast-moving average periods or the period of the PTP indicator.
Indicator period 2 Target Factor PTP - the setting for slow-moving average periods or the period of the PTP indicator.
Number of the indicator buffer for purchases - the setting for the indicator buffer for purchases.
Number of the indicator buffer for sales - the setting for the indicator buffer for sales.
Show the growth of the balance on the chart? - the setting displays information about the growth of the balance on the chart.
Warn about low margins? - the setting will warn the trader about low margins.
Order comment - sets up comments for orders. If the field is empty, the program name and "magic number" are specified in the comment.
Serial number (Magic Number) - the advisor uses this number to distinguish its orders from other orders.
Slippage - the setting sets the size of slippage in points.
Version 20.106 17.11.2020
This control only works in the real trading in the strategy tester is not running, the testing speed increased
A strict check of stops and takes was made. Now on the GBPUSD pair and its like a stop loss of the 1.00000 type should not appear.
The entire history of changes and updates can be viewed at the link.
At the moment, there are no plans for further development.
You can suggest an idea or revision in the "Reviews and discussions" section.
>What's in the archive
The archive contains files:
VR-Smart-Grid-RU.ex4 - version of the program in Russian language for MetaTrader 4
VR-Smart-Grid-EN.ex4 - English version of the program for MetaTrader 4
VR-Smart-Grid-RU.x5 - Russian version of the program for MetaTrader 5
VR-Smart-Grid-EN.x5 - English version of the program for MetaTrader 5
Optimization and testing files for the adviser
Adviser settings files
Expert Advisor testing report in Myfxbook monitoring
How the adviser works in the strategy tester
The EA works in the MetaTrader 4 tester for an hour
Question:How to install the advisor?
Answer:Open the MetaTrader terminal, Click File > Open data directory > Mql4 or Mql5 Folder > Experts folder at the top left. You need to put the advisor in this folder
It is an indispensable indicator for trading scalper strategies. The market pulse in the form of a tick chart in your terminal window will help you determine the change of the current trend in time, enter the market in time and exit correctly
The indicator marks up charts in its own way. In contrast to the standard marking method, VR Grid marks chart with the specified step and links the grid to round price values. The VR Grid indicator keeps the mark up and scale, so that the grid cells always have a constant size.
Hereby, in accordance with the Federal law No. 152-FZ "on personal data" dated 27.07.2006, I freely Express my unconditional consent to the processing of my personal data to Pastushak Vladimir Romanovich, registered in accordance with the legislation of the Russian Federation at the address:Rostov-on-don (hereinafter - the Operator).
Personal data - any information relating to a particular or determined on the basis of such information to an individual.
This Consent is issued by me for the processing of the following personal data:
The consent is given to the Operator to perform the following actions with my personal data using automation and/or without the use of such means: collection, systematization, accumulation, storage, clarification (update, change), use, depersonalization, as well as the implementation of any other actions provided by the current legislation of the Russian Federation as manual and automated methods.
This consent is given to the Operator to process my personal data for the following purposes:
providing me with services/works;
sending notifications to me regarding the services/works provided;
preparing and sending responses to my requests;
direction in my address information, including advertising, events/the goods/the services/the works of the Operator.
This consent is valid until its revocation by sending a notice to the email address firstname.lastname@example.org. In case of withdrawal of my consent to the processing of personal data, the Operator has the right to continue processing of personal data without my consent if there are grounds specified in paragraphs 2-11 of part 1 of article 6, part 2 of article 10 and part 2 of article 11 of the Federal law No. 152-FZ "on personal data" dated 27.06.2006.