[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 181
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
Good afternoon. I have such a question.
I have redesigned this indicator for my own needs with great difficulty from pieces of code of other Expert Advisors and Inductors. It is not a big code and it works the way I want it to.
The matter is that it performs some calculations internally and shows up or down arrows on the chart.
Please advise how to make an Expert Advisor to open an order in the right direction when arrow appears on the chart
More precisely, I just need to know which arrow is active now, I think I can do the rest
Here is a piece of code to make it clearer, it's an initialization in the indicator
SetIndexBuffer(1, Vverh);
SetIndexStyle(1,DRAW_ARROW);
SetIndexArrow(1,233);
SetIndexBuffer(2,Vniz);
SetIndexStyle(2,DRAW_ARROW);
SetIndexArrow(2,234);
Thanks in advance, everyone
Use the built-in iCustom function to receive the values of the custom indicator you need in the Expert Advisor.
For example, you need to know if there is an up or down arrow on the last fully formed bar:
Thanks for the reply! Yes the arrows sometimes go missing. Will this method read "0" if the arrow disappears?
And the arrow is drawn only on the emerging bar, the previous bars it does not re-draw, at the moment of occurrence it is necessary to open a deal and respectively if the arrow disappears then close
Yes the arrows sometimes go missing. Will this method through customisation read '0' if the arrow goes missing?
Yes, it will.
And the arrow is drawn only on the forming bar, the previous bars it does not re-draw, at the moment of occurrence it is necessary to open the position and respectively if the arrow disappears then close
спасибо за ответ! Да стрелки иногда пропадают. Этот способ через кастом будет считывать "0" если стрелка пропадет?
The value that is specified as "empty" in the code of the indicator is considered with iCustom. As a rule, it can be 0 or EMPTY_VALUE.
EMPTY_VALUE is default in indicators, but if you put SetIndexEmptyValue in init(), it will be different.
Is there any way to make the EA send requests to the server more often than usual using program code? So that instead of one request there are two, or for that you can just repeat the program shell ... If three requests instead of one, then repeat twice ...? ?
I have written a simple indicator. Here is the code:
There is only one buffer in it. The indicator values are of type double.In Expert Advisor, I decided to get the value of the indicator and apply it to the trade as a filter.
Here I wrote a simple function call of this indicator buffer on the last formed bar:
The slope value is not correct in the tester:Why? The type is correct. The call is also correct. The indicator works properly at all. Here is the log from the tester, but from a real current market:
Why is some number 2147483647 returned all the time instead of the required number ?
I have written a simple indicator. Here is the code:
It has only one buffer. The indicator values are of double type.In Expert Advisor, I decided to get the value of the indicator and apply it to the trade as a filter.
Here I wrote a simple function call of this indicator buffer on the last formed bar:
The slope value returned in the tester is not correct:Why? The type is correct. The call is also correct. The indicator works properly at all. Here is the log log on the tester, and from the real current market:
Why is some number2147483647 returnedall the time instead of the required number ?
In the tester at the beginning of work not enough bars in the history for the correct calculation of the indicator.
I have downloaded a story from Dukascopy since 2007... there's no way there are not enough bars. MA period is only 50.
I pasted your line, but I corrected return(0) ... and added the output of the number of bars on the chart:
Here in the log:
2013.02.26 17:53:26 2009.10.26 00:22 D_Aleks_first_pattern EURUSD,H1: iBars(NULL, i_TF) = 15895 2013.02.26 17:53:26 2009.10.26 00:22 D_Aleks_first_pattern EURUSD,H1: slope = 2147483647 2013.02.26 17:53:26 2009.10.26 00:22 D_Aleks_first_pattern EURUSD,H1: iBars(NULL, i_TF) = 15895 2013.02.26 17:53:26 2009.10.26 00:22 D_Aleks_first_pattern EURUSD,H1: slope = 2147483647 2013.02.26 17:53:26 2009.10.26 00:22 D_Aleks_first_pattern EURUSD,H1: iBars(NULL, i_TF) = 15895 2013.02.26 17:53:26 2009.10.26 00:22 D_Aleks_first_pattern EURUSD,H1: slope = 2147483647 2013.02.26 17:53:26 2009.10.26 00:22 D_Aleks_first_pattern EURUSD,H1: iBars(NULL, i_TF) = 15895 2013.02.26 17:53:26 2009.10.26 00:22 D_Aleks_first_pattern EURUSD,H1: slope = 2147483647
I have downloaded a story from Dukascopy since 2007... there's no way there are not enough bars. MA period is only 50.
Here's your line, but I corrected it with return(0) ...
Here it is in the log:
The problem seems to be in the indicator