Re: Coding Help
262Perhaps the prices from the Synergy indicator can also be added to the price function.
They are similar to Heiken ashi, though they differ, and are quite interesting.
I know the indicator enclosed is decompiled, but it's so old that it can already
be regarded as an open source... :-)
They are similar to Heiken ashi, though they differ, and are quite interesting.
I know the indicator enclosed is decompiled, but it's so old that it can already
be regarded as an open source... :-)
Attachments
Re: Coding Help
263Dear Mladen,
I have a question regarding the new price function.
I noticed such an irregular behaviour.
Let's take the enumerative declaration:
and change it to be (pr_ha... <-> pr_hab...)
and now the indicator (e.g., Trend Intensity Index 1.3.mq4) doesn't work for
any better formula price, but for all the other prices (including usual Heiken ashi)
it works without a problem. Is this correct and why is this so?
I have a question regarding the new price function.
I noticed such an irregular behaviour.
Let's take the enumerative declaration:
Code: Select all
enum enPrices
{
pr_close, // Close
pr_open, // Open
pr_high, // High
pr_low, // Low
pr_median, // Median
pr_typical, // Typical
pr_weighted, // Weighted
pr_average, // Average (high+low+open+close)/4
pr_medianb, // Average median body (open+close)/2
pr_tbiased, // Trend biased price
pr_tbiased2, // Trend biased (extreme) price
pr_haclose, // Heiken ashi close
pr_haopen , // Heiken ashi open
pr_hahigh, // Heiken ashi high
pr_halow, // Heiken ashi low
pr_hamedian, // Heiken ashi median
pr_hatypical, // Heiken ashi typical
pr_haweighted, // Heiken ashi weighted
pr_haaverage, // Heiken ashi average
pr_hamedianb, // Heiken ashi median body
pr_hatbiased, // Heiken ashi trend biased price
pr_hatbiased2, // Heiken ashi trend biased (extreme) price
pr_habclose, // Heiken ashi (better formula) close
pr_habopen , // Heiken ashi (better formula) open
pr_habhigh, // Heiken ashi (better formula) high
pr_hablow, // Heiken ashi (better formula) low
pr_habmedian, // Heiken ashi (better formula) median
pr_habtypical, // Heiken ashi (better formula) typical
pr_habweighted,// Heiken ashi (better formula) weighted
pr_habaverage, // Heiken ashi (better formula) average
pr_habmedianb, // Heiken ashi (better formula) median body
pr_habtbiased, // Heiken ashi (better formula) trend biased price
pr_habtbiased2 // Heiken ashi (better formula) trend biased (extreme) price
};
Code: Select all
enum enPrices
{
pr_close, // Close
pr_open, // Open
pr_high, // High
pr_low, // Low
pr_median, // Median
pr_typical, // Typical
pr_weighted, // Weighted
pr_average, // Average (high+low+open+close)/4
pr_medianb, // Average median body (open+close)/2
pr_tbiased, // Trend biased price
pr_tbiased2, // Trend biased (extreme) price
pr_habclose, // Heiken ashi (better formula) close
pr_habopen , // Heiken ashi (better formula) open
pr_habhigh, // Heiken ashi (better formula) high
pr_hablow, // Heiken ashi (better formula) low
pr_habmedian, // Heiken ashi (better formula) median
pr_habtypical, // Heiken ashi (better formula) typical
pr_habweighted,// Heiken ashi (better formula) weighted
pr_habaverage, // Heiken ashi (better formula) average
pr_habmedianb, // Heiken ashi (better formula) median body
pr_habtbiased, // Heiken ashi (better formula) trend biased price
pr_habtbiased2,// Heiken ashi (better formula) trend biased (extreme) price
pr_haclose, // Heiken ashi close
pr_haopen , // Heiken ashi open
pr_hahigh, // Heiken ashi high
pr_halow, // Heiken ashi low
pr_hamedian, // Heiken ashi median
pr_hatypical, // Heiken ashi typical
pr_haweighted, // Heiken ashi weighted
pr_haaverage, // Heiken ashi average
pr_hamedianb, // Heiken ashi median body
pr_hatbiased, // Heiken ashi trend biased price
pr_hatbiased2 // Heiken ashi trend biased (extreme) price
};
any better formula price, but for all the other prices (including usual Heiken ashi)
it works without a problem. Is this correct and why is this so?
Re: Coding Help
264wojtekwojtek wrote: Thu May 18, 2017 5:42 am Dear Mladen,
I have a question regarding the new price function.
I noticed such an irregular behaviour.
Let's take the enumerative declaration:
and change it to be (pr_ha... <-> pr_hab...)Code: Select all
enum enPrices { pr_close, // Close pr_open, // Open pr_high, // High pr_low, // Low pr_median, // Median pr_typical, // Typical pr_weighted, // Weighted pr_average, // Average (high+low+open+close)/4 pr_medianb, // Average median body (open+close)/2 pr_tbiased, // Trend biased price pr_tbiased2, // Trend biased (extreme) price pr_haclose, // Heiken ashi close pr_haopen , // Heiken ashi open pr_hahigh, // Heiken ashi high pr_halow, // Heiken ashi low pr_hamedian, // Heiken ashi median pr_hatypical, // Heiken ashi typical pr_haweighted, // Heiken ashi weighted pr_haaverage, // Heiken ashi average pr_hamedianb, // Heiken ashi median body pr_hatbiased, // Heiken ashi trend biased price pr_hatbiased2, // Heiken ashi trend biased (extreme) price pr_habclose, // Heiken ashi (better formula) close pr_habopen , // Heiken ashi (better formula) open pr_habhigh, // Heiken ashi (better formula) high pr_hablow, // Heiken ashi (better formula) low pr_habmedian, // Heiken ashi (better formula) median pr_habtypical, // Heiken ashi (better formula) typical pr_habweighted,// Heiken ashi (better formula) weighted pr_habaverage, // Heiken ashi (better formula) average pr_habmedianb, // Heiken ashi (better formula) median body pr_habtbiased, // Heiken ashi (better formula) trend biased price pr_habtbiased2 // Heiken ashi (better formula) trend biased (extreme) price };
and now the indicator (e.g., Trend Intensity Index 1.3.mq4) doesn't work forCode: Select all
enum enPrices { pr_close, // Close pr_open, // Open pr_high, // High pr_low, // Low pr_median, // Median pr_typical, // Typical pr_weighted, // Weighted pr_average, // Average (high+low+open+close)/4 pr_medianb, // Average median body (open+close)/2 pr_tbiased, // Trend biased price pr_tbiased2, // Trend biased (extreme) price pr_habclose, // Heiken ashi (better formula) close pr_habopen , // Heiken ashi (better formula) open pr_habhigh, // Heiken ashi (better formula) high pr_hablow, // Heiken ashi (better formula) low pr_habmedian, // Heiken ashi (better formula) median pr_habtypical, // Heiken ashi (better formula) typical pr_habweighted,// Heiken ashi (better formula) weighted pr_habaverage, // Heiken ashi (better formula) average pr_habmedianb, // Heiken ashi (better formula) median body pr_habtbiased, // Heiken ashi (better formula) trend biased price pr_habtbiased2,// Heiken ashi (better formula) trend biased (extreme) price pr_haclose, // Heiken ashi close pr_haopen , // Heiken ashi open pr_hahigh, // Heiken ashi high pr_halow, // Heiken ashi low pr_hamedian, // Heiken ashi median pr_hatypical, // Heiken ashi typical pr_haweighted, // Heiken ashi weighted pr_haaverage, // Heiken ashi average pr_hamedianb, // Heiken ashi median body pr_hatbiased, // Heiken ashi trend biased price pr_hatbiased2 // Heiken ashi trend biased (extreme) price };
any better formula price, but for all the other prices (including usual Heiken ashi)
it works without a problem. Is this correct and why is this so?
You can not change just the enum
It has to be like it is coded in the original - and it has to work in cooperation with the appropriate get price function, or you have to change the function too
Re: Coding Help
266wojtek
If you change that, there are conditions in the get price function that need to be altered
That was the reason why it worked like you told. Enum itself are actually some integer values - with a convenient way of accessing them by name not by value - the rest is the code that uses those integer values to process as any usual code
Re: Coding Help
267Hello all I am new on your website I am writing you by google translation because I am French and very bad in English lo sorry for spelling mistakes I would need help I do not know if the indicator already exists But I am working on a project I would need a warning indicator that shows me when the price is accelerating downward or upward on the current candle eg 4 hour I would be really grateful if someone could m 'Help it just that the indicator produces an alert when the price accelerates on the current candle up or down an indicator of preference on mt4 thanks in advance to every person who helps me
Re: Coding Help
268Check this thread for start : Multi time frame indicators ...acerdufer wrote: Fri May 19, 2017 6:47 am Hello all I am new on your website I am writing you by google translation because I am French and very bad in English lo sorry for spelling mistakes I would need help I do not know if the indicator already exists But I am working on a project I would need a warning indicator that shows me when the price is accelerating downward or upward on the current candle eg 4 hour I would be really grateful if someone could m 'Help it just that the indicator produces an alert when the price accelerates on the current candle up or down an indicator of preference on mt4 thanks in advance to every person who helps me
Re: Coding Help
269Yes, they are integer starting from 0 - I noticed that when I 'coded' an auxiliary indicatormladen wrote: Thu May 18, 2017 6:02 am
You can not change just the enum
It has to be like it is coded in the original - and it has to work in cooperation with the appropriate get price function, or you have to change the function too
with iCustom to extract buffers from ex4 indicator with enum declarations
(they can be declared as integers). By the way, changing the order of
enum variables from (pr_, pr_ha, pr_hab) to, for instance, (pr_ha, pr_hab, pr_)
is OK, only (pr_ha, pr_hab) -> (pr_hab, pr_ha) doesn't work.
Re: Coding Help
270wojtek wrote: Fri May 19, 2017 8:46 am Yes, they are integer starting from 0 - I noticed that when I 'coded' an auxiliary indicator
with iCustom to extract buffers from ex4 indicator with enum declarations
(they can be declared as integers). By the way, changing the order of
enum variables from (pr_, pr_ha, pr_hab) to, for instance, (pr_ha, pr_hab, pr_)
is OK, only (pr_ha, pr_hab) -> (pr_hab, pr_ha) doesn't work.
Yes.
That is happening because of some conditions in the get price function
See the get price function and you shall see why is it so