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
TakeProfitLastClosePos() function.
Returns the TakeProfit price level of the last closed position or -1. The TakeProfitLastClosePos() function accepts the following optional parameters:
Function MovingInWL().
Moves the StopLoss price level of the open positions to Breakeven. MovingInWL() function takes the following optional parameters:
Moreover, MovingInWL() function has global variables (external parameters of script or Expert Advisor):
SimpleTrailing() function.
Moves the StopLoss price level of open positions using the TrailingStop algorithm. Function SimpleTrailing() accepts the following optional parameters:
In addition, the SimpleTrailing() function implies global variables (external parameters of the script or Expert Advisor):
ArrayZ() function.
This function calculates and returns the Z-count of a numeric series passed in the array by reference.
The ArrayDeleteInt() function
Executes the deletion of an array element with the given index. Returns the size of the new array or -1 if nothing was removed. The ArrayDeleteInt() function accepts the following mandatory parameters:
The ArrayDeleteDouble() function
Deletes an element of the array with the given index. It returns the size of the new array or -1, if nothing could be deleted. The ArrayDeleteDouble() function accepts the following mandatory parameters:
The ArrayDeleteString() function
Executes the deletion of an array element with the given index. Returns the size of the new array or -1 if nothing could be removed. The ArrayDeleteString() function accepts the following mandatory parameters:
The ArrayInsertDouble() function
Inserts an element of the array with the specified index. It returns the number of elements (size) of the new array. The insertion is performed as follows. First, the size of the array is increased by one. Then all elements that have an index greater than or equal to the one to be inserted are shifted to the end of the array one by one, making room for the one to be inserted. Finally, the value is written into the required cell. The ArrayInsertDouble() function takes the following parameters:
The BubbleSort2() function.
This function bubbles the elements of a two-dimensional array into an arbitrary column. You can also specify the sort direction. The BubbleSort2() function takes the following parameters:
The GetTypeLastDeleted() function.
This function returns the type of the last deleted order, or -1. There are situations where we need to tie the EA operation logic to the type of the just deleted order. For example, if you have just deleted BuyStop, you should do that, but if BuyLimit, you should do something else, etc. The GetTypeLastDeleted() function accepts the following optional parameters:
The iBarLargest() function.
This function returns the index of the largest bar or -1. The size of the bar is measured by the function in one of two ways, determined by the input parameter ty - type of search items. Either just the body size or together with the shadows. The iBarLargest() function accepts the following optional parameters:
The iBarOfDayCalc() function.
This function returns the calculated number of the bar from the beginning of the day. The bars are numbered starting from one, i.e. the bar with the shortest opening time in the given day will be number one, the next bar will be number two, etc. This function is useful for optimizing entry/exit times. If anyone is interested in details, ask questions. I will do my best to answer them. The iBarOfDayCalc() function takes the following optional parameters:
Function iBarOfDayReal().
This function returns the actual bar number from the beginning of the day. The bars are numbered with one, i.e. the bar with the shortest opening time in the given day will have number one, the next bar will have number two, etc. I haven't found any practical use for this function yet. But I have written it to have it :-) together with function iBarOfDayCalc(). The iBarOfDayReal() function accepts the following optional parameters:
NameDayOfWeek() function
Returns the name of the day of the week by the number passed as a parameter:
Function NormalizeLot().
This function returns the normalized value of the lot being traded. Besides normalization, it also fits the lot size into the limits set by the dealing centre (minimum and maximum lot values and lot change step are checked). Function NormalizeLot() accepts the following parameters:
NormalizePrice() function.
This function returns the normalized price value. Normalization is performed using MarketInfo(MODE_TICKSIZE || MODE_DIGITS) function values. The NormalizePrice() function takes the following parameters:
The WeekOfMonth() function.
This function returns the week of the month by date. Accepts only one optional parameter:
Function ClosePosBySortLots().
This function closes positions in the order of sorting by lot size. That is, using this function, you can close positions in ascending or descending order of lot sizes. Function ClosePosBySortLots() accepts the following optional parameters:
The AddLeadingZero() function.
This function adds as many leading (left) zeros "0" to the string so that the string length becomes equal to some given value. The AddLeadingZero() function takes the following mandatory parameters:
Function toTime().
This function converts two/three integers to a string in time format. If you pass two numbers into the function, the first will be used as hours and the second as minutes. The format string returned will be "HH:MM". If there are three numbers, the third will be replaced by the seconds and the function will return the "HH:MM:SS" string. The toTime() function accepts the following optional parameters: