Coding help - page 297

 
12BPRO:
Dear Sir CODER's GURU,

I appreciate a little HELP here, first let me explain the situation...........

This is my ConsoleTrend on a M15TF, the TOT represent the total of each currency under each buffer... (7 buffers).

I need to do this.....

1) How do I sort this buffers in finding the highest and the lowest value

2) Assign these highest and lowest to the respective pairings... for ORDERING (buying or selling)

As you can see currently NZD has the highest value and JPY has the lowest value..........

I would like to match these currency to open up an order BUY NZDJPY...

I have tried to place these values in an array, then sort the array in descending and ascending order using ArraySort function

but there is an error stating a constant expression required...

double values[];

int start()

values[7]={TOTGBP, TOTEUR, TOTUSD, TOTJPY, TOTAUD, TOTNZD, TOTCAD};

Could someone HELP me PLEASE.....

Your assistants is highly appreciated....

yours truly

AZRUL.....

AZRUL

You can not initialize an array with other variables.

If you need a content of other variables in an array do it like this in the code:

values[0] = TOTGBP;

values[1] = TOTEUR;

and so on

and after that you can sort the values array

 
mladen:
AZRUL

You can not initialize an array with other variables.

If you need a content of other variables in an array do it like this in the code:

values[0] = TOTGBP;

values[1] = TOTEUR;

and so on

and after that you can sort the values array

Dear Sir MLADEN,

Thank you for your respond... I have got the value running in the sorted array...

That was simple enough for YOU SIR...... I'm sooooo glad to have you around..... 4th Credit

Now let me try to do the 2nd question!!!!

2) Assign these highest and lowest to the respective pairings... for ORDERING (buying or selling)

Thanks again SIR for your time and respond....

yours truly,

AZRUL......

Files:
 
12BPRO:
Dear Sir MLADEN,

Thank you for your respond... I have got the value running in the sorted array...

That was simple enough for YOU SIR...... I'm sooooo glad to have you around..... 4th Credit

Now let me try to do the 2nd question!!!!

2) Assign these highest and lowest to the respective pairings... for ORDERING (buying or selling)

Thanks again SIR for your time and respond....

yours truly,

AZRUL......

AZRUL

If I understand correctly what do you want to do, you will have to make a 2 dimension sorting procedure (where you will store the value + symbol in one element). You can not do that using built in array sorting functions since they do not work with 2 or more dimension arrays

 
mladen:
AZRUL If I understand correctly what do you want to do, you will have to make a 2 dimension sorting procedure (where you will store the value + symbol in one element). You can not do that using built in array sorting functions since they do not work with 2 or more dimension arrays

Dear Sir MLADEN,

Sorry I was not aware of that..... I guess it is back to the drawing board....

I have to think for awhile to find another approach then....

THANKS FOR THE TIP.....

yours truly...

AZRUL....

 

Dear SIR MLADEN,

Sorry to post this question on this thread...

Is there a THREAD were I could post some general question about MT4....

If not could you please OPEN up ONE.....

THANKS....

 
12BPRO:
Dear SIR MLADEN,

Sorry to post this question on this thread...

Is there a THREAD were I could post some general question about MT4....

If not could you please OPEN up ONE.....

THANKS....

AZRUL

This is a good thread for such questions too

If you want really general questions, you can use this thread also : https://www.mql5.com/en/forum/176352

 

Hi coding expert friends,

Would you please to help to combine 2 indicators into one indicator.

They are:

1). M-candles indicator

2). moving average indicator

I want to add a moving average into M-candles like the picture.

Thanks and Regards,

anton

 
anton1:
Hi coding expert friends,

Would you please to help to combine 2 indicators into one indicator.

They are:

1). M-candles indicator

2). moving average indicator

I want to add a moving average into M-candles like the picture.

Thanks and Regards,

anton

anton

Here you go : m-candles__ma.mq4

Files:
 

Hi mladen,

Thanks a lot.

It works well.

Best Regards,

anton

mladen:
anton Here you go : m-candles__ma.mq4
 

Hi all,

I need a simple addition to the Ea listed below. The buy and sell images example the entries. I have tried numerous logical boolean 'and's , just can't get the entry on the second bband_stop break. Thanks in advance.

Files:
Reason: