IndicatorCounted().... bug?Back to topics list |
|
sub
2008.07.29 01:07
I have Build 217 02/Jul/2008
int start()
{
counted_bars=IndicatorCounted();
if(counted_bars<0) return(-1);
if(counted_bars==0)
{
process history bars
}
else
{
process bar 0
}
}
|
3289 |
Rosh
2008.07.30 11:58
No, it isn't bug. IndicatorCounted() returns 0 (zero) in first indicator calculating and if available history is changed. Indicator must know that it's necessary to recalculate ones buffers for sufficient value.
|
|
sub
2008.07.30 19:35
No, it isn't bug. IndicatorCounted() returns 0 (zero) in first indicator calculating and if available history is changed. Indicator must know that it's necessary to recalculate ones buffers for sufficient value. Rosh, my problem is that it appears that the indicator resets or restarts itself. When it happens I can see window cursor showing "time wait" icon. No crash message. I have never had this problem before. After this false restart, I have to manually reload the indicator because the window display gets destroyed. Do you have any idea what may caused it. I have read similar complaints at this forum in past. |
3289 |
Rosh
2008.07.31 14:02
One more time again: if history was changed by any reason the IndicatorCounted() function return 0 (zero). It's especial that you can recalculated you indicator if it is necessary. You can't get any window crash or destroy from this function.
|
|
sub
2008.08.05 12:11
One more time again: if history was changed by any reason the IndicatorCounted() function return 0 (zero). It's especial that you can recalculated you indicator if it is necessary. You can't get any window crash or destroy from this function. I believe I have found the problem! As always for some unknown reason the MT4 program gets corrupted over a period of time and will start reseting itself skipping init() function which will cause incomplete reset. To reinstall MT4 into same directory will usually not fix the problem. To fix this corrupted installation it is necessary to open new directory with NEW NAME reinstall MT4 and copy all indicators/scripts and experts into the new directory. Although I am not sure I do attribute this corruption to a registry leakage since I can see unexplained migration of some data from one MT4 terminal into next one. |
|
sub
2008.11.24 03:13
sub :
One more time again: if history was changed by any reason the IndicatorCounted() function return 0 (zero). It's especial that you can recalculated you indicator if it is necessary. You can't get any window crash or destroy from this function. I believe I have found the problem! As always for some unknown reason the MT4 program gets corrupted over a period of time and will start reseting itself skipping init() function which will cause incomplete reset. To reinstall MT4 into same directory will usually not fix the problem. To fix this corrupted installation it is necessary to open new directory with NEW NAME reinstall MT4 and copy all indicators/scripts and experts into the new directory. Although I am not sure I do attribute this corruption to a registry leakage since I can see unexplained migration of some data from one MT4 terminal into next one. Finally I believe I fix the problem!....... it was filthy cooling fan on the CPU. Folks keep it clean. |
|
phy
2008.11.24 11:23
That's a hot tip...
|
|
sub
2009.02.19 07:54
OK, none of the foregoing fixed the problem. It looks like some memory problem. I am using a 1M chart with lot of objects per bar and it seems to work a OK for about 4 days 24*60*60 = Bars 345600 I have set Max Bars 1024000 bars in the chart and same in the history to make sure that enough memory is allocated. I have 1024 MB memory module in Windows XP
For some reason it appears that there is not enough memory or something is not properly set to allow my Trader 4 to take full advantage of it. Is there any seating for memory allocation.
When I reach this 4 day condition the indicator would irregularly restart even from the Property window after hitting the OK button. It would take many attempts to restart corectly. Slawa...... any suggestion? I am going bananas. Edited: I should add that the problem is not evident when market is closed over the weekend and there are no incoming ticks. |
|
sx_ted
2009.02.19 13:25
sub, the following has helped me in big programs: #property indicator_buffers 2 // up to 8 |
|
sub
2009.02.19 22:58
sx_ted :
sub, the following has helped me in big programs: #property indicator_buffers 2 // up to 8 sx_ted, I am using all 8 buffers so my property setting must be: #property indicator_buffers 8 |
