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 ArrayInsertDouble() function
Inserts one element of an array with the given index. 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:
SZY. Please find attached scripts to test ArrayInsertDouble(), ArrayInsertInt(), ArrayInsertString() functions.
ZZZY. I updated the b-Array library on my site.
Igor, since we're talking about arrays, can we go back to my old request, about sorting arrays ('Useful functions from KimIV'). What was done earlier is a bit wrong, sorry for the indefinite TOR.
I need to sort a two-dimensional array by a given column (row), analog of the operation in EXCEL. This procedure is needed to use Spearman's statistic 'Spearman's Rank Correlation Coefficient', in some variant analysis of correlation matrices currencies (portfolios).
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:
GetTypeLastDeleted() function.
This function returns the type of the last deleted order, or -1. There may be situations where we need to tie the EA operation logic to the type of a 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:
Yes, now this one.
#include "b-KimIV.mqh" // Additional functions library
Hello Oleg!
For error-free compilation of the b-Positions. mqh library, you need the functions that are already in this branch:
So, you can do the following:
Good luck!
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 bar number from the beginning of the day. The bars are numbered from one, i.e. the bar with the shortest opening time in a 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:
SZY. I attach a script to test the iBarOfDayCalc() function. The illustration below shows how to use the script.
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 a 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:
SZY. I attach a script to test the iBarOfDayReal() function. The illustration below shows how to use the script.
The iBarOfDayReal() function.
I haven't found a practical application for this function yet.
yyyy... :)
I'm here as a training tool, decided to write a script which calculates the distance traveled.
If anyone knows there is a program that counts how many kilometres the mouse ran on the monitor.
So here, add up the open-close bars of the current day (week, month or year) or if you imagine
another way, like a thread and needle stitching a fur coat: Open-close-close-close-close-close-close-close-close... in the course of the graph.
Same thing but on the high-low...
*
The hitch started from the very first steps.
How do I filter the bars of the current day from the chart...
I'll try to apply your functions for this dabbling.
Igor. Good afternoon.
Maybe you can draw a simple task for you: the task (for me) is the following:
The task is as follows: set at what price value the signal line will cross the MACD, or, in other words, the MACD histogram will become equal to zero.
Solution of this problem is needed, for example, to calculate a stop price or order limit for the next bar in the signals of a trading system which uses this indicator,
which will visually show the price level, at which the MACD histogram will cross the nought line (i.e., the crossing of one line over the price - line on the chart)
This refers to the percentage MACD calculated using the formulaMACD= (FastEMA/SlowEMA - 1). Periods 12, 26, Signal 9.
I have codes for Omega and Metostock. I cannot find anywhere else how to implement it in MT4.
Thank you