
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
The NumberOfOrders() function.
This function returns the number of orders and functionally completely overrides ExistOrders(). To replace the ExistOrders() function with the NumberOfOrders() function, it is necessary and sufficient to check the return value so that it is greater than zero. You can limit the list of orders to be checked using the function parameters:
The ClosePosBySelect() function.
Closes one pre-selected position. This function is rather auxiliary, because it is called from several other functions, which help to select positions to close by some conditions.
The ClosePosBySizeProfitInCurrency() function.
This function closes only those positions for which the profit in the deposit currency exceeds a certain specified value. You can specify which positions must be closed using the function parameters:
The ClosePositions() function.
This function closes positions whose parameters meet the specified values:
The ClosePosFirstProfit() function.
This function closes positions in a certain order, i.e. profitable positions first, followed by all other positions. A more accurate selection of positions to be closed is defined by external parameters:
The ClosePosWithMaxProfitInCurrency() function.
This function closes one position with the maximum positive profit in the deposit currency. That is, out of five positions, each of which has a profit of -34, 15, 73, -90, 41, the position with a profit of 73 units in the deposit currency will be closed. A more accurate selection of positions to be closed is specified using external parameters:
DistMarketAndPos() function.
Here we go! Here come more interesting functions! For example, it returns the distance in pips between the market and the nearest position. The more accurate selection of positions to be checked is set by external parameters:
Function ExistOPNearMarket().
This function returns a flag that an order or position exists near the market (at a specified distance in pips from the market). A more accurate selection of orders or positions to be checked is specified by external parameters:
Function ExistPosByPrice().
This function returns a flag for the existence of a position at a given open price. A more accurate selection of positions to be checked is defined by external parameters:
The GetAmountLotFromOpenPos() function.
This function returns the sum of lots of open positions. A more accurate selection of positions to be taken into account is specified by external parameters: