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
It looks to me that the Blue Arrow is buffer 0 and the Red Arrow is buffer 1, you will find an arrow at a bar index when the value is NOT 2147483647
yes it prints an arrow on screen when the value is not 2147483647
which is why i said i can now write some code to make use of that info but i cannot figure out how to read the arrow from the screen
I cant find any info on buffers and how to write them
i did find the setindexbuffer but it is only for indicators when i compile
so it will have to go to the back burner i guess slow process learning to code but i have enough now to write most stuff i want to play with
What you have to do is check using the index number of a bar to see if there is a Red or Blue arrow there . . . you use the index (bar number) with iCustom and if the value is not 2147483647 then you have an arrow there . . . you have to do it twice, once iCustom call for buffer 0 - Red, and once for buffer 1 - Blue
For example, if you wanted to find the last red arrow and last blue arrow . . . last being the ones nearest to the right side of the chart.
code is NOT tested . . . . it's just an example to give you some ideas.
You have two Arrows and both appear with a signal from a different buffer
so BlueArrow= iCustom(NULL,0,"EMA Crossover",4,5, .........,1);
RedArrow= iCustom(NULL,0,"EMA Crossover",4,5, .........,1);
Also you have to look for every indicator to the chart if the arrows are appearing for the firsttime at bar 0, or 1 or 2 ....... and if they not disappear repaint
If they not repaint you can use them for making an EA
Don't put in the EA
That's for indicators......OK i have fixed the code a bit and now i get a 1 or 2147483647 from each signal which is way better ty guys for your help
code below
What you have to do is check using the index number of a bar to see if there is a Red or Blue arrow there . . . you use the index (bar number) with iCustom and if the value is not 2147483647 then you have an arrow there . . . you have to do it twice, once iCustom call for buffer 0 - Red, and once for buffer 1 - Blue
For example, if you wanted to find the last red arrow and last blue arrow . . . last being the ones nearest to the right side of the chart.
code is NOT tested . . . . it's just an example to give you some ideas.
if(iCustom(. . . . . 0, Index ) < 2147483647)
Would be better written as
if(iCustom(. . . . . 0, Index ) < EMPTY_VALUE )
if(iCustom(. . . . . 0, Index ) < 2147483647)
Would be better written as
if(iCustom(. . . . . 0, Index ) < EMPTY_VALUE )
the code i posted above works perfectly
aside from that when you refer to the index is that the last bar ie last bar =0
but to get the information i need it set to 1 which is previous bar and this give me the correct signal at the start of the new bar
just asking for clarification of "index"
ty again four everyones help
the code i posted above works perfectly
aside from that when you refer to the index is that the last bar ie last bar =0
but to get the information i need it set to 1 which is previous bar and this give me the correct signal at the start of the new bar
just asking for clarification of "index"
Did you look through my code posted above ?
Do you understand how bars are numbered ?
Read this part of the Book : https://book.mql4.com/variables/arrays
That you get the value 1 for when there is an arrow is because you have made it an integer
To find the correct value of an iCustom(....) function you have to use
double
instead of integer ........
Then the code from RaptorUK very nice..... only not working this way but giving ideas
Index is number for bar to check