Page 10 of 180

Re: Coding Help

Posted: Thu Mar 16, 2017 2:06 am
by ionic
Why you dont reply my post dear moderators?
I m a member this gentleman forum. Being RICH is up to you. please reply.  
Thanks.

Re: Coding Help

Posted: Thu Mar 16, 2017 2:37 am
by wojtek
mntiwana wrote: Hi wojtek,do you want hide some thing (parameters) as been secrets and mysteries :roll:
No, I don't.  
I simply have a few indicators in one separate window, therefore the buffer labels
and the 'indicator short names' take too much place, so I like they disappear.

Re: Coding Help

Posted: Thu Mar 16, 2017 5:31 am
by mntiwana
ionic wrote:Why you dont reply my post dear moderators?
I m a member this gentleman forum. Being RICH is up to you. please reply.  
Thanks.
I think every body replying you already,but when any of your query is not clear exact,what to answer you,it will be just guessing around,please try to explain exact what help you required,do not push fellows in puzzles.
Aside from,forum is providing you much than you contributing to forum
regards

Re: Coding Help

Posted: Thu Mar 16, 2017 11:26 pm
by ionic
Hii mr. mntiwana and tools

I have a simple ma EA on mt5.
But it has some problem ea.
? need your help.
can you help me pls?

thanks in advance

Re: Coding Help

Posted: Thu Mar 16, 2017 11:54 pm
by mrtools
ionic wrote:Hii mr. mntiwana and tools


I have a simple ma EA on mt5.
But it has some problem ea.
? need your help.
can you help me pls?


thanks in advance
Ionic, don't know post the EA and maybe we can help

Re: Coding Help

Posted: Fri Mar 17, 2017 9:45 am
by wojtek
Dear Mladen,
I have a problem with priceInstances.
Say, I would like to use the following four prices in the code of a (one) indicator:

Code: Select all

getPrice(pr_close,Open,Close,High,Low,i)
getPrice(pr_median,Open,Close,High,Low,i)
getPrice(pr_haclose,Open,Close,High,Low,i)
getPrice(pr_hamedian,Open,Close,High,Low,i)
How to define priceInstances so that the function getPrice would work properly?
It would be enough to attach an indicator in which a few priceInstances are used.

Re: Coding Help

Posted: Fri Mar 17, 2017 11:39 am
by mladen
wojtek wrote:Dear Mladen,
I have a problem with priceInstances.
Say, I would like to use the following four prices in the code of a (one) indicator:

Code: Select all

getPrice(pr_close,Open,Close,High,Low,i) getPrice(pr_median,Open,Close,High,Low,i) getPrice(pr_haclose,Open,Close,High,Low,i) getPrice(pr_hamedian,Open,Close,High,Low,i)
How to define priceInstances so that the function getPrice would work properly?
It would be enough to attach an indicator in which a few priceInstances are used.
Like this :

Code: Select all

getPrice(pr_close,Open,Close,High,Low,i,0)
getPrice(pr_median,Open,Close,High,Low,i,1)
getPrice(pr_haclose,Open,Close,High,Low,i,2)
getPrice(pr_hamedian,Open,Close,High,Low,i,3)

Re: Coding Help

Posted: Fri Mar 17, 2017 11:54 am
by wojtek
Thank you!   Additionally, do I need to change something in the definition of getPrice?:

Code: Select all

#define priceInstances 1
double workHa[][priceInstances*4];
double getPrice(int tprice, const double& open[], const double& close[], const double& high[], const double& low[], int i, int instanceNo=0)

Re: Coding Help

Posted: Fri Mar 17, 2017 12:02 pm
by mrtools
wojtek wrote:Thank you!   Additionally, do I need to change something in the definition of getPrice?:

Code: Select all

 #define priceInstances 1 double workHa[][priceInstances*4]; double getPrice(int tprice, const double& open[], const double& close[], const double& high[], const double& low[], int i, int instanceNo=0) 

yes #define priceInstances 1
should be#define priceInstances 4

Re: Coding Help

Posted: Fri Mar 17, 2017 12:06 pm
by wojtek
Thank you. MrTools!