Anyone knows why we get in the begin nearly all the time twice the whole amount of bars?
http://docs.mql4.com/customind/IndicatorCounted
I just copied part of the example code in the attached test indicator. (test.mq4)
The result is this.
EXAMPLE1 M1:
12:15:58 test EURUSD,M1: loaded successfully
12:15:58 test EURUSD,M1: initialized
12:15:58 test EURUSD,M1: Alert: limit: 2154
12:16:01 test EURUSD,M1: Alert: limit: 2
12:16:01 test EURUSD,M1: Alert: limit: 3
12:16:01 test EURUSD,M1: Alert: limit: 2
12:16:01 test EURUSD,M1: Alert: limit: 2155
12:16:01 test EURUSD,M1: Alert: limit: 2
12:16:01 test EURUSD,M1: Alert: limit: 2
12:16:02 test EURUSD,M1: Alert: limit: 2
12:16:03 test EURUSD,M1: deinitialized
12:16:03 test EURUSD,M1: uninit reason 1
12:16:03 test EURUSD,M1: removed
EXAMPLE2 M5:
12:21:35 test EURUSD,M5: loaded successfully
12:21:35 test EURUSD,M5: initialized
12:21:35 test EURUSD,M5: Alert: limit: 2070
12:21:36 test EURUSD,M5: Alert: limit: 2
12:21:38 test EURUSD,M5: Alert: limit: 2
12:21:38 test EURUSD,M5: Alert: limit: 2
12:21:38 test EURUSD,M5: Alert: limit: 2070
12:21:38 test EURUSD,M5: Alert: limit: 2
12:21:39 test EURUSD,M5: Alert: limit: 2
12:21:39 test EURUSD,M5: Alert: limit: 2
12:21:39 test EURUSD,M5: Alert: limit: 2
12:21:40 test EURUSD,M5: Alert: limit: 2
12:21:40 test EURUSD,M5: Alert: limit: 2
12:21:41 test EURUSD,M5: deinitialized
12:21:41 test EURUSD,M5: uninit reason 1
12:21:41 test EURUSD,M5: removed
EXAMPLE3 H1:
12:22:24 test EURUSD,H1: loaded successfully
12:22:24 test EURUSD,H1: initialized
12:22:24 test EURUSD,H1: Alert: limit: 2050
12:22:25 test EURUSD,H1: Alert: limit: 2
12:22:25 test EURUSD,H1: Alert: limit: 2
12:22:27 test EURUSD,H1: Alert: limit: 2050
12:22:27 test EURUSD,H1: Alert: limit: 2
12:22:28 test EURUSD,H1: Alert: limit: 2
12:22:28 test EURUSD,H1: Alert: limit: 2
12:22:28 test EURUSD,H1: Alert: limit: 2
12:22:35 test EURUSD,H1: Alert: limit: 2
12:22:35 test EURUSD,H1: Alert: limit: 2
12:22:36 test EURUSD,H1: Alert: limit: 2
12:22:37 test EURUSD,H1: Alert: limit: 2
12:22:37 test EURUSD,H1: Alert: limit: 2
12:22:38 test EURUSD,H1: Alert: limit: 2
12:22:39 test EURUSD,H1: Alert: limit: 2
12:22:40 test EURUSD,H1: Alert: limit: 2
12:22:40 test EURUSD,H1: deinitialized
12:22:40 test EURUSD,H1: uninit reason 1
12:22:40 test EURUSD,H1: removed
Anyone knows why we get that always twice?
if one uses a for loop like in the example http://docs.mql4.com/customind/IndicatorCounted
for(int i=0; i<limit; i++) we calculate twice the whole bars?
Any thoughts are appreciated
http://docs.mql4.com/customind/IndicatorCounted
I just copied part of the example code in the attached test indicator. (test.mq4)
The result is this.
EXAMPLE1 M1:
12:15:58 test EURUSD,M1: loaded successfully
12:15:58 test EURUSD,M1: initialized
12:15:58 test EURUSD,M1: Alert: limit: 2154
12:16:01 test EURUSD,M1: Alert: limit: 2
12:16:01 test EURUSD,M1: Alert: limit: 3
12:16:01 test EURUSD,M1: Alert: limit: 2
12:16:01 test EURUSD,M1: Alert: limit: 2155
12:16:01 test EURUSD,M1: Alert: limit: 2
12:16:01 test EURUSD,M1: Alert: limit: 2
12:16:02 test EURUSD,M1: Alert: limit: 2
12:16:03 test EURUSD,M1: deinitialized
12:16:03 test EURUSD,M1: uninit reason 1
12:16:03 test EURUSD,M1: removed
EXAMPLE2 M5:
12:21:35 test EURUSD,M5: loaded successfully
12:21:35 test EURUSD,M5: initialized
12:21:35 test EURUSD,M5: Alert: limit: 2070
12:21:36 test EURUSD,M5: Alert: limit: 2
12:21:38 test EURUSD,M5: Alert: limit: 2
12:21:38 test EURUSD,M5: Alert: limit: 2
12:21:38 test EURUSD,M5: Alert: limit: 2070
12:21:38 test EURUSD,M5: Alert: limit: 2
12:21:39 test EURUSD,M5: Alert: limit: 2
12:21:39 test EURUSD,M5: Alert: limit: 2
12:21:39 test EURUSD,M5: Alert: limit: 2
12:21:40 test EURUSD,M5: Alert: limit: 2
12:21:40 test EURUSD,M5: Alert: limit: 2
12:21:41 test EURUSD,M5: deinitialized
12:21:41 test EURUSD,M5: uninit reason 1
12:21:41 test EURUSD,M5: removed
EXAMPLE3 H1:
12:22:24 test EURUSD,H1: loaded successfully
12:22:24 test EURUSD,H1: initialized
12:22:24 test EURUSD,H1: Alert: limit: 2050
12:22:25 test EURUSD,H1: Alert: limit: 2
12:22:25 test EURUSD,H1: Alert: limit: 2
12:22:27 test EURUSD,H1: Alert: limit: 2050
12:22:27 test EURUSD,H1: Alert: limit: 2
12:22:28 test EURUSD,H1: Alert: limit: 2
12:22:28 test EURUSD,H1: Alert: limit: 2
12:22:28 test EURUSD,H1: Alert: limit: 2
12:22:35 test EURUSD,H1: Alert: limit: 2
12:22:35 test EURUSD,H1: Alert: limit: 2
12:22:36 test EURUSD,H1: Alert: limit: 2
12:22:37 test EURUSD,H1: Alert: limit: 2
12:22:37 test EURUSD,H1: Alert: limit: 2
12:22:38 test EURUSD,H1: Alert: limit: 2
12:22:39 test EURUSD,H1: Alert: limit: 2
12:22:40 test EURUSD,H1: Alert: limit: 2
12:22:40 test EURUSD,H1: deinitialized
12:22:40 test EURUSD,H1: uninit reason 1
12:22:40 test EURUSD,H1: removed
Anyone knows why we get that always twice?
if one uses a for loop like in the example http://docs.mql4.com/customind/IndicatorCounted
for(int i=0; i<limit; i++) we calculate twice the whole bars?
Any thoughts are appreciated
Attached File(s)
test.mq4
1 KB
|
460 downloads
__Thanks__ MJ