imamushroom / Publications
Forum
How to draw a horizontal line at position -1
Hello, I want to be able to draw a horizontal line between position 0 and position -1. I can do now between position 1 and position 0, thanks to the help in this post: https://www.mql5.com/en/forum/437621 but 0 to -1 doesn't work. I'd thought about using OBJ_HLINE and using the Ray Right function
Indicator Loop Problem
Hello, Normally, I use the following code to perform my looping within an indicator: int lookback = 15 ; int limit = Bars - 1 - MathMax (lookback, prev_calculated); for ( int i = limit; i >= 0 && ! IsStopped (); --i) { // my code } return rates_total-1; However, I want to
Horizontal Line between two candles
Hello, I'm using this code to try and draw a horizontal line between two adjacent candles. int i = 100 ; double prediction = 141.550 ; ResetLastError (); // prediction-100 here is a test, normally it should be just prediction to get a horizontal line but in order to show //
Sliding window
Hello, I've like to create an indicator which uses a sliding window and displays some horizontal lines on the screen from period - 1440 to period, where period is 3/4 is the last candle of the screen displayed candles but I know know how I will code this. I've produced this screen image to
Wrong parameters count / Event handling function not found
Hello, I have the following code and when I compile it I'm getting "Wrong parameters count" compilation error but I can't see why. Could some one tell me where I'm going wrong please. //+------------------------------------------------------------------+ //|
New Feature Request (order of indicators)
Hello, One thing I'd like to be able to do is change the order of the indicators in the data window at will, rather than having to unload and then load them in the correct order. Would you consider changing this in a future release? Thanks
CArrayObj Update corrupting record
Hello, Could someone tell me how to fix this code please? It's exiting with an invalid pointer after the Update operation. #include <Arrays/ArrayObj.mqh> //+------------------------------------------------------------------+ //| |
How to convert a CObject* back to it's complex type source
I'm trying access a CObject* of a CArrayObj array but I can't seem to put it back into the structure that was originally placed there. My complex type is: class myobj_t : public CObject { public : double a; datetime b; myobj_t( void )
How to write a Copy Constructor
Hello, How do I write a copy constructor for a public class (structure substitute) please? For sake of an example lets say the public class is as below: class struct : public CObject { public : double a; datetime b; }; I'm using this structure with CArrayObj
CArrayObj and struct
Hello, I'm trying to add a series of structures to a CArrayObj but having problems. Could someone point me to the solution please? My code is as follows: #include <Arrays/ArrayObj.mqh> struct test_t { double a; double b; datetime c; }; CArrayObj *obj = new CArrayObj; void OnStart () {