See /en/code/34815 I wonder if this shows a bug, lack of understanding or MQ5 limitation, I have a Color Line and a Color Histogram defined. They both work fine independently, but only one will display when they are
This is a re-write of the old Solar Winds indicator for MQ5. There has recently been some 'excitement' about using this with other indicators for entry signals, and after a request to develop an indicator using it, I found that it was a classic re-painter - so I am contributing this code with an easy switch to allow seeing the indicator in re-paint versus non-repaint mode.
This utility is not a trading information utility. It will only have value for those getting information on the Number of Bars that have terminal data. This utility uses the functions SeriesIntegerInfo and CopyRates to obtain and display information about the availability of bar information from the terminal.
This utility is not a trading or market information utility. This will likely only interest those writing (or debugging) indicators using multiple timeframes and collecting information using Bars (or iBars) and CopyRates.
The utility creates a list showing the number of Bars reported by the "Bars" function and shows the success of CopyRates for any selected bar by displaying that bar's time from the collected data (or, it shows the error).
I'm Looking for help on how to initialize terminal data before OnCalculate is called. Attached is a sample indicator and associated log file showing the errors posted - I thought that after calling CopyRates for an 'old' bar, eventually the data
The utility will display the high, low, open, close and time statistics for any user selected bar of any timeframe for the symbol of the chart the utility resides on.
User may enter up to 50 symbols from their market watch in either a long or short basket for viewing. The symbols for the chart can be changed to any symbol in the display with a click on the symbol. Statistics including ATR for the chart period, points gained or lost from a weeks start and position gains or losses and lots exposure are displayed. The statistics week may be changed with simple clicks on the display, and the display may be dragged and dropped to different locations. The load on quote processing is kept low by simply posting an event that starts the processing for a display update.
This is a working singleton code example. The sole purpose of this post is to provide a working code sample of a singleton object. A singleton object is created when there 'can be only one' of the object. This is accomplished by making an object's constructor private, and ensuring assignment and copy operations are also private.
I was working on an EA and identified that an object should never have more than one copy. I don't expect the EA to ever get large enough for it to actually matter that a singleton is used, but I like the clarity in the code for the object's type.
The code follows closely the tutorial at http://www.yolinux.com/TUTORIALS/C++Singleton.html.
This is a utility for beginning indicator programmers, or others, that want to have a look at values provided by OnCalculate and a few other functions.
The indicator shows:
1) The most recent value provided with the most recent OnCalculate call.
2) The previous value from the previous OnCalculate call.
3) The first value from the first time onCalculate executed.
Trying some 'const correctness' in my code - and getting "call non- const method for constant object" class someClass { ... public: int getSomePrivateInt(void){ return( somePrivateInt ); } } *someClassPtr;
Please find attached an indicator that does nothing but display the values passed to OnCalculate - and a few other values from functions common in indicator development. Question: Why, when accessing volume[] or spread[] do I get an
datetime DayOneArray[] = { D'0000.00.00 00:00:00' , D'0000.00.00 00:00:00' }; // no valid time identified on this day datetime DayTwoArray[] = { D'0000.00.00 05:45:00' , D'0000.00.00 15:00:00' }; Etc. So then we have function: void