We recommend:

  1. Home
  2. Scripts
  3. Count Symbol Weight – script for count second symbol trading lot

Count Symbol Weight – script for count second symbol trading lot

Script for calculating the lot of the second symbol for trading

As you know, not all currency pairs have the same “weight” because the price of the item they can be different, and if you open positions with the same lot for two pairs with the same goals, then when the Teik Profit or Stop Loss, we will get different profits or losses.

Here is an approximate list of the value of the item for different Forex exchange pairs at the moment:

We see that pairs with USD all have a price of an item equal to 1, the rest vary.

This simple script performs an important function in calculating a trading lot for two currency pairs with different item prices. It will be useful for manual selection of lots for trading multiple pairs with the same goals.

The script also calculates the volatility of two currency pairs and when this feature is included in the settings and can help with double trading.

Script settings:

First Symbol LotA well-known lot trader with whom he wants to open a warrant for the current pair on which the script is installed. This lot can be calculated manually or using our Count trading lot script, which takes into account the percentage of the given risk per trade depending on Stop Loss
Second SymbolCurrency pair, on which it is necessary to calculate the trading lot
Count Volatility BarsConsider volatility when calculating a trading lot.
At 0 – off.

An example of how the script works:

Let’s say that the price of a pair item with a U.S. dollar is one, while minor pairs have a great value. At the moment, GBPAUD has 0.64 and EURGBP is 1.25.

If the trader needs to get an income of $100 with a $100 rate of income for a goal of 100 old items, then his trading lot should be 0.1. But in order to get the exact same return in the deposit currency on another pair the trader needs to adjust the trading lot. In this case, the lot will be 1/0.64.1 q 0.15, and for EURGBP, 1/1.25-0.1 is 0.08.

If you practice doubles, you know that the volatility of different currency pairs is very different (you can use our TrueVolatility

indicator or The AverageRange Volatility script for detailed volatility calculations). Ie. if you want to enter the market on two symbols EURUSD and GBPUSD, the price of the item they have the same, but the average price movement will be different, for example now it is 95 and 67 points respectively. So with the same Take Profit, EURUSD has a chance to close in plus faster than GBPUSD. Or if your trades are directed towards each other, the speed of their rapprochement will not be equal, and the trading lot will remain the same. That is why the volume of the position is recommended to be adjusted to take into account volatility: if the volume of the trade for EURUSD is 0.1, then in this case the trading lot for GBPUSD should be calculated as 0.1/95/67.14. In the settings you can specify the number of bars to calculate Count Volatility Bars, we recommend exhibiting 200-300 bars.

Of course, there should still be considered swaps for different currencies, but this calculation, unfortunately, can not be laid in the code, because. we cannot know how many days positions will be opened and in which direction.

Note: it is worth paying attention to metals trading, as their weight of the item is much higher than the weight of currency pairs on Forex.

By installing the script in the MT4 terminal on the graph of NZDCAD and specifying the second EURUSD symbol, we will get Alert and a log entry:

We see that the volume of the tick, the volatility (in pairs trading) and the trading lot for the second symbol, with which it is recommended to open a trade, has been displayed.

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed

Menu