ammer.jens: but it is not compiling:
Do not post code that will not even compile. Compare your call and the documentation and fix the first, compile, repeat.
Your code | Documentation. |
---|---|
int OnCalculate( const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[], const int timeframe ){ | int OnCalculate ( const int rates_total, // size of input time series const int prev_calculated, // bars handled in previous call const datetime& time[], // Time const double& open[], // Open const double& high[], // High const double& low[], // Low const double& close[], // Close const long& tick_volume[], // Tick Volume const long& volume[], // Real Volume const int& spread[] // Spread ); |
William Roeder #:
Do not post code that will not even compile. Compare your call and the documentation and fix the first, compile, repeat.
Your code | Documentation. |
---|---|
Fixed this error. Please see above, I edited my original post. thank you
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
Hi, I searched through the entire forum and used google to find an example of an indicator that displays Heiken Ashi candles from higher timeframes onto the current main window of the chart. For example, I use the MQL5 standard Heiken_Ashi.ex5 indicator on the M1 timeframe to display the bars. Now, I want to use this indicator in addition to display Heiken Ashi candles from M15 timeframe. However, just changing the period did not do the trick:
I found some MQL4 examples but I am not able to translate this to MQL5. I found the following MQL5 indicator that illustrates my needs:
https://www.mql5.com/en/market/product/51137?source=Site+Search
And finally I found the following MQL5 indicator using TimeFrame and CopyOpen etc. functions for the time shift:
I adjusted the code and added the timeframe variable above but commented out the 4 lines of the Copy part as I do not understand this part at all. I don't understand if this is anyhow the way to do it or if it goes into the wrong direction and it is not possible to do it this way? I have to less u nderstanding of the indicators unfortunately