The VR Calculate Martingale indicator is a powerful tool for calculating orders' profit and loss.

The VR Calculate Martingale indicator is a powerful tool for calculating orders' profit and loss.

14 October 2019, 16:59
Vladimir Pastushak

Today I would like to share my experience in grid trading since I believe that almost everyone once in a lifetime had multiple positions opened on their trading account.

I frequently find myself in a situation with 20-50 market orders piled up. What do you do with all of them? Is there a way to calculate the appropriate price to profitably close all of them or a part of them without leaving the lossmaking ones at the same time? What is the current margin, how much does one point cost?

What do you when you follow the trend accumulating 10-30 orders? You never know the moment the trend will end! How do you find out the level where profitable order becomes lossmaking?

I tried to calculate the numbers manually in various third-party programs such as Excel, I have sworn off not to open more than 2-3 orders simultaneously over and over again – however, it all appeared to bein vain.

I have also frequently used grid of orders not only to gather the trend profit but also to close unprofitable deal with a small profit. To do this I had to open the orders with standard lot against the trend. However, it has always been a problem to calculate the zero price.  

As the time went by, I accumulated more experience and learned how to set up indicators and to calculate the average advisors’ prices. At one moment, I had an idea to write a real order calculator, the one with no risk. It is possible with the help of Mql language, that allows to calculate everything ahead of time with the help of virtual orders. This idea was introduced in the indicator called VR Calculate Martingale.

The first version was written back in 2015. Interestingly, I realized the versatility and value of my indicator only after I performed some calculations. One can think that there is nothing special in it – only the middle prices. However, it is unique – no one has created another indicator like this.

With the help of it, I can calculate literally any trading strategy, such as:

  • swing;

  • pendulum;

  • consistent trading;

  • grid trading;

  • grid trading in different directions.

Let us closely look at the user interface to understand how to utilize the indicator.

Launch VR Calculate Martingale indicator:

After placing the indicator on the graph, the “Open orders” panel appears. One can easily move it across the graph by grabbing the big top left mark with the mouse. In addition, you will see the sign imitating the price movement. Move it to see the order loss and profit. In fact, the sign is the price imitation.

“Open virtual orders” panel lets the trader open virtual sell or buy order. It will also display the volume amount of opened orders, the number of orders, their margin, order type profit and total profit. The panel will only calculate the data for the opened and closed orders, not taking the deleted ones into account.

How to open a virtual order

VR Calculyate Martingale

The first virtual order will appear on the graph after one presses the Buy button. It will contain the following information:

  • 1 is the order number.

  • V is the menu used to open and input the data about take profit and stop loss.

  • ~ is the menu used to specify the unique symbol for the grid of orders.

  • Buy/Sell is the button that helps the trader to change the buy order to sell in a blink of an eye.

  • Open is the current state indicator, meaning that the order is opened. Clicking on it will open the additional menu that allows choosing the order closure method.

  • 0.01 is the order volume. One can modify it by setting another value directly on the order. It is worth mentioning that one can input the volume using both dot and coma – indicator will perform correct calculations anyway.

  • 1.09917 is the current order price. One can modify it directly on the order, similar to the volume. The order will instantly move to the new number. If the order is moved with the mouse, the price will change accordingly.

  • 6,36$ is your current loss or profit. The color will change to green or red depending on the order state, indicating the profitable and lossmaking ones.

  • ◾ is the mark used to move the order. Double click will fix the order on the current spot. Do it one more time to see the mark again.

“Stop loss and take profit” menu

VR Calculate Martingale

This indicator allows setting the stop loss and take profit levels for the order. To do that, one has to click the V menu button and choose “Take Profit” button to see the value. The take profit level can be set up by the mouse or manually. It is also possible to set the points number. The order indicator will instantly show the potential profit or loss.

Averaging symbols menu

VR Calculate Martingale

This menu allows choosing the group of orders that will become averaged. One can create up to eight grids and apply the unique symbol to each of them.

For example, one can combine three buy and two sell orders into one grid. Indicator will perform the calculations and show the price to close all of them without the loss and profit. One will also see the profit amount should one close all of them at the current price.

“Close order” menu

VR Calculate Martingale

“Averaging symbols” menu

“Close order menu” helps the trader close or completely remove the order from the diagram.

The Open button will leave the order as it is.

CL button will close the order as if it was closed by the current price taken from the mark imitating the price movement.

SL button will close the order as if it was closed by Stop loss. Note that in this case order should have stop loss.

TP button will close the order as if it was closed by Take profit. Note, that in this case the order should have take profit.

Delete button will delete the order from the diagram; it will not be taken into account during the future calculations.  

Closed orders do not disappear. All of them will be moved to the top left corner so that one can easily open any of them and work with it on the diagram.

On the picture, one can see two Closed by stop loss orders with the loss of -5.22. Another one is Closed by take profit with the profit of 5.41.

Let us build the grid of orders

VR Calculate Martingale

VR Calculate Martingale

On the first picture, one can see the stages to follow in order to create the grid of orders. The lot is increased by Martingale system. There is a line from every order to the average price. Note that for every order the red averaging C symbol is chosen – thus, the price will also be shown in red. This will help to distinguish the group of orders with different symbols. Please also note that there is a loss number on the average price. It is calculated from the price imitation mark. If we close all the orders by the current price from this mark, we will lock -$60.10 loss. One can move the orders on the grid as well as instantly change the lots on the orders.

Different grids with different average price

VR Calculate Martingale

On the picture one can see two grids averaged by two orders, each of them has its own average symbol – C and B. Every order group has its own profit we will receive should we close the order by the price mark of the current price.

VR Calculate Martingale

On the picture one can see the example on how to work with the different order types. Indicator has calculated the average price as well as the profit received upon closure by the current price.

VR Calculate Martingale indicator is indeed a professional tool that I currently use for my everyday trading. When I find something new, I always can calculate the outcome. I can calculate every offered trading strategy almost instantly; it helps to understand if it makes any sense.

Thank you for your attention and I wish you the very best of luck!

Video in Englishi showing how the indicator works

Links to additional material:

Share it with friends: