
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Code for prices :
{
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
};
//------------------------------------------------------------------
//
//------------------------------------------------------------------
//
//
//
//
//
//
#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 _bars, int instanceNo=0)
{
if (tprice>=pr_haclose)
{
if (ArrayRange(workHa,0)!= _bars) ArrayResize(workHa,_bars); instanceNo*=4;
//
//
//
//
//
double haOpen;
if (i>0)
haOpen = (workHa[i-1][instanceNo+2] + workHa[i-1][instanceNo+3])/2.0;
else haOpen = (open[i]+close[i])/2;
double haClose = (open[i] + high[i] + low[i] + close[i]) / 4.0;
double haHigh = MathMax(high[i], MathMax(haOpen,haClose));
double haLow = MathMin(low[i] , MathMin(haOpen,haClose));
if(haOpen <haClose) { workHa[i][instanceNo+0] = haLow; workHa[i][instanceNo+1] = haHigh; }
else { workHa[i][instanceNo+0] = haHigh; workHa[i][instanceNo+1] = haLow; }
workHa[i][instanceNo+2] = haOpen;
workHa[i][instanceNo+3] = haClose;
//
//
//
//
//
switch (tprice)
{
case pr_haclose: return(haClose);
case pr_haopen: return(haOpen);
case pr_hahigh: return(haHigh);
case pr_halow: return(haLow);
case pr_hamedian: return((haHigh+haLow)/2.0);
case pr_hamedianb: return((haOpen+haClose)/2.0);
case pr_hatypical: return((haHigh+haLow+haClose)/3.0);
case pr_haweighted: return((haHigh+haLow+haClose+haClose)/4.0);
case pr_haaverage: return((haHigh+haLow+haClose+haOpen)/4.0);
case pr_hatbiased:
if (haClose>haOpen)
return((haHigh+haClose)/2.0);
else return((haLow+haClose)/2.0);
case pr_hatbiased2:
if (haClose>haOpen) return(haHigh);
if (haClose<haOpen) return(haLow);
return(haClose);
}
}
//
//
//
//
//
switch (tprice)
{
case pr_close: return(close[i]);
case pr_open: return(open[i]);
case pr_high: return(high[i]);
case pr_low: return(low[i]);
case pr_median: return((high[i]+low[i])/2.0);
case pr_medianb: return((open[i]+close[i])/2.0);
case pr_typical: return((high[i]+low[i]+close[i])/3.0);
case pr_weighted: return((high[i]+low[i]+close[i]+close[i])/4.0);
case pr_average: return((high[i]+low[i]+close[i]+open[i])/4.0);
case pr_tbiased:
if (close[i]>open[i])
return((high[i]+close[i])/2.0);
else return((low[i]+close[i])/2.0);
case pr_tbiased2:
if (close[i]>open[i]) return(high[i]);
if (close[i]<open[i]) return(low[i]);
return(close[i]);
}
return(0);
}
Dearest MLADEN
I believes,now newest Averages (rewritten) for MT4 ver will be post soon :)
regards
This is an upgraded step stochastic
Changes :
Two points probably need an explanation :
Price filtering (and average range smoothing) : both are introduced in order to make filter out some false signals. As usual, probably the best is to show an example comparison , so here it is : upper is without price filtered (averaged), lower is using a very mild 5 period ema for price filtering - the difference is even like this obvious :
The code is highly optimized now (to the extent that step stochastic is a function now - that can use anything as an input for calculation) and is cross platform portable (it will work the same way on mt4 as on mt5 - only two lines need to be changed) which means that it will be done for metatrader 4 too ASAP :)
One possibility that is less known about this type of step stochastic : see the example when slow parameter is set to less than 1 (be advised that it is a highly experimental territory and that for slow parameter set to, in general, values less than 0.5 results can be illogical) - that opens a whole new ground for experimenting with these types of settings
This indicator needs an "warning" ...
It is using Gaussian filter of arbitrary order (poles) calculation depth, and, to have results that are not "too fast" you have to set the calculating period to some longer period. That is probably the first time I have seen that something is "too fast" and that the period needs to be adjusted to linger periods.
This version uses the standard 22 price types and is already a multi time frame version. Some experimenting is needed, but as a rule of thumb, the higher the order the smoother the result, but in that case lessen the periods (to get a fast and smooth result)
Since I dont use MT5 platform is this repainting ?
forum is migrating (the mt4 forum is migrating to mql5 forum)
Dearest MLADEN
Do you means whole past coding work (mq4) from TSD by you, will be converted to (mq5) as i see the speed and numbers of mq5 indicators updated at "MQL5" code base site by you,even till now every indicator with original code (mq5).
and do you think TSD will be merge there one day or will be working as usual independently.
regards
Since I dont use MT5 platform is this repainting ?
Dearest MLADEN
Do you means whole past coding work (mq4) from TSD by you, will be converted to (mq5) as i see the speed and numbers of mq5 indicators updated at "MQL5" code base site by you,even till now every indicator with original code (mq5).
and do you think TSD will be merge there one day or will be working as usual independently.
regards
I don't know what will exactly happen to TSD : owning company does not have any plans to shut TSD down (no reason for that), so I think that it will be as is. It is natural that the "mother site" is benefiting from the work here too (but as you can see, the transfer is limited almost exclusively to what I was coding - so no "grabbing" is happening) and I must say I agree : it was sometimes sad to see how little mt5 code was made and how little mt5 coders are there around (at least those that I know of and that are doing something that is usable). I hope it will be changed, and, quite frankly, I am enjoying myself now since I like the new ways of coding I can apply now (not just mt5 - since mt4 is closer to mt5, see, for example, what can we do with a simple #define :))
PS: I think that you have noticed too that it is not a conversion that is done. I am making new stuff (I have a feeling that I am doing it more than ever - some really new things were made in the last couple of weeks). I would hate to just grab the mt4 code and convert : that is not the goal and that is not what is going to be done. At least some improvement in process must be done or else it is meaningless
I don't know what will exactly happen to TSD : owning company does not have any plans to shut TSD down (no reason for that), so I think that it will be as is. It is natural that the "mother site" is benefiting from the work here too (but as you can see, the transfer is limited almost exclusively to what I was coding - so no "grabbing" is happening) and I must say I agree : it was sometimes sad to see how little mt5 code was made and how little mt5 coders are there around (at least those that I know of and that are doing something that is usable). I hope it will be changed, and, quite frankly, I am enjoying myself now since I like the new ways of coding I can apply now (not just mt5 - since mt4 is closer to mt5, see, for example, what can we do with a simple #define :))
PS: I think that you have noticed too that it is not a conversion that is done. I am making new stuff (I have a feeling that I am doing it more than ever - some really new things were made in the last couple of weeks). I would hate to just grab the mt4 code and convert : that is not the goal and that is not what is going to be done. At least some improvement in process must be done or else it is meaningless
Dearest MLADEN
First,thanks for explained reply ...... just it was a matter of possible doubts and worries regarding TSD future,for us it is a university,we learned a lot from here and have had a lot in kind of A class tools and concerning knowledge, imagine just now we (at least me) started understanding things regarding MT4 but i think there will be no big difference in MT5 tools working behavior as for us users.the only unpleasant factor that our years of collection is going to trash.
This is wonderful you enjoying new way of coding with new applications you invented just currently few weeks back and yes i noticed that new mt5 indicators here and there too,all new with new coding method and style,also i noticed the numbers of your tools and download numbers too :):) that gave me a pleasant feeling.
I believes the GAP (between mt4 and mt5 in quantity) will be filled soon within months with the speed you are coding along with quality wise too.also i believes there will be no competitor to our boss regarding multiple concerns at MQL5 code base.
all our good wishes with you
Source code for rsx variation indicator
Upgraded version of rsx variation (with some new prices added)
To remind :
RSX as is is most usually defined as "smoother RSI", and it is correct in most of the cases
RSX uses in its calculation what we could call a momentum using period 1. This version is a variation and allows you to use instead any momentum length. Of course, it caries added lag with it (when the momentum period is increased) but in some cases (if the momentum period is increased moderately) it can filter out some false signals
Mladen,
Will you do or do you do some freelance programming as well :) ?