Coding help - page 300

 

Tested it with builds 625, 646 and 650 too and attaching the results (used the attached indicator)

Files:
test_2.mq4  1 kb
test_650.gif  102 kb
test_646.gif  103 kb
test_625.gif  102 kb
 

Thanks mladen for your tests!

I am using Build 646 and this 3 codelines works in an indicator, but no in an ea.

I can put it in the init or in the start-function and I am getting always the same "error" print as on my screenshot.

When I change the value from "99.40" to "99.4" it is the same. But every(?!) other value is working as it should.

I mean, this is really a strange bug...

 

I have another question...

What does the three values on the first page of the strategy tester mean:

1 088 / 1 280 (39 204)

OK the first is the acutal number of run.

And perhaps 39204 the number of runs to do with all connections?

Sometimes the value in the brackets it smaler the this before.

The tester did only 134 runs. I have "show useless results" activated.

 
sunshineh:
I have another question...

What does the three values on the first page of the strategy tester mean:

1 088 / 1 280 (39 204)

OK the first is the acutal number of run.

And perhaps 39204 the number of runs to do with all connections?

Sometimes the value in the brackets it smaler the this before.

The tester did only 134 runs. I have "show useless results" activated.

Then it seems that metatrader installations from different brokers are not working the same way. That would be the only explanation

 

Dear SIR MLADEN,

I am trying to do a Ranking of the current array values and inserted the following code in my indicator....

Unfortunately the compile button is not active.....

int rank (double value)

{

// The above 2 lines probably should be elsewhere and set as global variables

for (int i=0; i<ArraySize(RankValues); i++)

{

if (RankValues == value)

{

return (i+1);

}

}

return (0);

}

Could you PLEASE advice what went wrong.... and how do I go about it to rank this value in descending order..

Your time and expertise is highly appreciated...

Thanks....

best regards

AZRUL...

Files:
 

Hi Mladen,

I would like little indicator which ,on 5 min time frame, shows me when stoc 5-3-3 is below 20 on 15 min time frame.

I don't want stoc multitimeframe....but signal of higher time frame on lower tf.

Thank's in advance

 

mladen, mrtool...

need help to modify/add color changing rule by 2 moving averange (MA period 8 n MA period 24).

if MA8 > MA24, histo color=green.

if MA8 < MA24, histo color=red.

here is indicator link : https://www.mql5.com/en/code/download/7992/BW_MFI.mq4

 
12BPRO:
Dear SIR MLADEN,

I am trying to do a Ranking of the current array values and inserted the following code in my indicator....

Unfortunately the compile button is not active.....

int rank (double value)

{

// The above 2 lines probably should be elsewhere and set as global variables

for (int i=0; i<ArraySize(RankValues); i++)

{

if (RankValues == value)

{

return (i+1);

}

}

return (0);

}

Could you PLEASE advice what went wrong.... and how do I go about it to rank this value in descending order..

Your time and expertise is highly appreciated...

Thanks....

best regards

AZRUL...

AZRUL

You are not supplying the value that you want to look for in line 180 (this line :

int ranking = rank();

so the rank function can not compare to any value. Your call must be in a following form :

int ranking = rank(someValueToRank);

 

Hi Mladen

Was the indi ok?

 

Hi,

I am using the file functions and they work fine!

I am using rather big files and I am working with a for-loop.

In every cycle I am reading one line of the file. So sometimes I want to change a word in one of this lines.

Is there an easy way to do it? If I close the file for reading and open it for writing, than my file pointer goes to the end of the file.

But is there a posibility to get the actual file pointer position? So I can also write directly f.e. in the middle of the file.