MisterH / Publications
Forum
Zigzag NRP on oscillator: counter since last "zig" error (not repainting)
Hi guys. This is a question for people familiar with the Zig-Zag indicator . It's pretty old, but has its use. Multiple changes were made to the standard indicator, turning it into a custom indicator (hereby attached called "#BarsSinceLastZigZag_MOD2"): Instead of using High & Low of a bar, only the
Fitting a parabola
If you want to fit a parabola (y=ax^2+bx+c) to e.g. the last 3 values of a buffer, you need to solve a system of 3 linear equations. In software like Matlab or R that is really easy to do, but how would you do it in mql4? I guess there is no function for this
Array out of range
There is some explanation on this error here and here . But still I can not figure it out.. So please check out this code on an indicator called RMO, "Rahul Mohindar Oscillator". Coded not by me, but a great coder on another forum.. But after all the updates and changes to MT4 this does not work any
most simple multi-color indicator
Hi, Is it possible to give me a very, very simple example of an indicator that gives a green color when it's rising and red when it's going down: let's say on this buffer: ma[i]=iMA(0,0,10,0,2,0,i); I realize it will need at least 3 buffers: 1 for the value, 1 for the rising (that paints green) and
Repainting: what can you do agaisnt it???
Hi, what can you do against repainting of indicators? When you do a visual mode backtest of an empty EA and you drop the indicator on the chart, you really see how it performs (repainting or not), opposed to simply putting it on a live chart (too slow to evaluate repainting). So if you have seen
Dynamic Range Bars
Hi, I did a bit of research this weekend on variations on constant range bars. Google it if you don't know what it is. There's a nice script from MQLservice to do this. It's a commercial script so I can't post it but there's a number of variations non-constant range bars; mostly for Ninjascript
Inflection color
If you want to change the color of the buffer, not based on turning points like usual (when the slope changes from negative to positive the color changes from red to green & vice versa), but on inflection points: when the first derivative changes signs, how would you code that? This is a start, but
Weights of an EMA
So in mql4 you can use the function iMA or iMAOnArray if you want to create an exponential (MODE_EMA) or other type of moving average. Now an EMA is usually created by iteration : EMA = (CLOSE(i)*P)+(EMA(i-1)*(1-P)). But you could also calculate it in a different way: using a vector
indicator that looks at its own turning points to decide its length?
Hi, say you want to change the window length of your indicator to the number of bars since its last turning point, you would do that like this: for ( int i= 0 ; i<limit; i++) { ExtMapBuffer0[i]= iMA ( 0 , 0 , 10 , 0 , 0 , 0 ,i); } for (i=limit- 1 ; i>= 0 ; i--) { double curr =
Angle in degrees
How do you measure the angle in degrees from the last bar's close to the close n bars ago? And no, the angle does not change if you zoom out, because zooming out does not mean changing the length of a unit, it only changes the perspective, it's like when you draw a triangle on a sheet of paper and