scfx: it doesn't feed trading EA correctly.
int limit=rates_total-prev_calculated; if(limit<0) limit=2; : { for(int j=i+1;j<=i+100;j++) //within the next 100 bar { if( end1[j]==1) { for(int k=i;k<=j;k++) { if( iCustom(NULL,0,"series010",0,k)==0) |
|
Hi WHRoeder,
It is a indicator and I think that it is how it work.
Assume that the indicator starts calculating bar 1.
The section you quote should ask the indicator to go to bar 2 and check, then bar 3... bar 101.
I thought that the limit is only put requirement on i rather than on j. (the first 2 steps do not require the look back)
The second question is that, the last step where I calculate the number0, I look back 100 bar and I already put the condition within for() below.
Does this count?
for(int i=1;i<limit && i+100<limit;i++)
or should I put?
int limit=rates_total-prev_calculated; if(limit<100) limit=100;
Thank you for your help.
SCFX
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
Hi Everyone,
I write an indicator that has Entry/TP/SL buffer and it show arrow/value on chart correctly. However, it doesn't feed trading EA correctly. the EA start many positions where there is no value on the Entry buffer from the indicator. Some how it still have Entry/SL/TP.
I narrow down to 1 potential problem and let me explain it below.
Assume that each bar, there is a variable1 which can take value 0 or 1. So the time series look like that
0 0 0 1 1 1 0 0 1 1 1 0 0 0 0 11 0 0 1
Take the section underlined (1 1 1 0 0 1 1 1 0 0 0 0 1 ) for example.
I want to count the number of 0 between each series of 1. So for the data above, the first 1 blue will have a Number0[i]=2 and the last 1 in dark-red has a Number0[i]=4.
My code is below. It is quite straight forward.
I wonder if when I assign the END of series on (i+1), should it could any issue when I feed the final Number0 buffer to an EA.
Thank you for your help.
SCFX