Dear all,
The title can't be changed. But let me simplify the question as below.
I must have some mis-understanding on bars,buffers or indicator.
According to the code, I understand that every bar always is drawn based on previous bars at the left and no re-drawing should happen.
However, I really observed re-drawing already. Please refer to the indicator file enclosed below. The main content is only about 10 lines as I pasted here.
No matter how hard I tried to analyze again and again, I can't find the issue code to re-draw the indicator and it must be out of my capability already.
May I ask a favor for you to suggest where the problem is? Thank you very, very, ..., very much!
P.S. for Current bar[0], the re-drawing is needed. However, the problem is why bar ..., bar[6], ...,bar[1] may be re-drawn or re-calculated?
for(i=limit-1; i>=0; i--)
{
The title can't be changed. But let me simplify the question as below.
I must have some mis-understanding on bars,buffers or indicator.
According to the code, I understand that every bar always is drawn based on previous bars at the left and no re-drawing should happen.
However, I really observed re-drawing already. Please refer to the indicator file enclosed below. The main content is only about 10 lines as I pasted here.
No matter how hard I tried to analyze again and again, I can't find the issue code to re-draw the indicator and it must be out of my capability already.
May I ask a favor for you to suggest where the problem is? Thank you very, very, ..., very much!
P.S. for Current bar[0], the re-drawing is needed. However, the problem is why bar ..., bar[6], ...,bar[1] may be re-drawn or re-calculated?
for(i=limit-1; i>=0; i--)
{
MaxH = High[iHighest(NULL,0,MODE_HIGH,period,i)];
MinL = Low[iLowest(NULL,0,MODE_LOW,period,i)];
price = (High[i]+Low[i])/2;
Value = 0.33*2*((price-MinL)/(MaxH-MinL)-0.5) + 0.67*Value1;
Value=MathMin(MathMax(Value,-0.999),0.999);
ExtBuffer0[i]=0.5*MathLog((1+Value)/(1-Value))+0.5*Fish1;
Value1=Value;
Fish1=ExtBuffer0[i];
if(ExtBuffer0[i]>0) ExtBuffer1[i]=10;
else ExtBuffer1[i]=-10;
}Attached File(s)
solarjoy.mq4
6 KB
|
293 downloads
|
Uploaded May 7, 2015 10:56pm