Serving Traders Since 2005
|
|
|
|||||||
| MetaTrader 5 MT5 is already out of its beta stage, but the development is ongoing. Some brokers already offer real accounts and the interest of traders is growing. You can discuss anything related to MetaTrader 5 in this forum. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
Hi
I am not getting my indicator on the screen when I compile and run the code below. do I need to drag it to a chart or to id a window? Please take a look to see if all else is Ok. thx MQL5 Code:
|
|
||||
|
SetIndexBuffer(0,rlBuffer,INDICATOR_DATA); should go into OnInit() handler. You should be filling the array (rlBuffer) with actual indicator values in the OnCalculate().
__________________
Please, read the Forum Rules and the Signature Rules to avoid termination of your account. |
|
||||
|
Quote:
Why this is not plotting as expected? MQL5 Code:
|
|
||||
|
iBuf[0] is the oldest bar on the chart in MetaTrader 5 (unless you use ArraySetAsSeries() on it), not the newest. So, are you sure it's not plotting?
__________________
Please, read the Forum Rules and the Signature Rules to avoid termination of your account. |
|
||||
|
Quote:
GBPJPY H4 MQL5 Code:
|
|
||||
|
First, remove any indicator buffer assignments from the OnInit(). Second, you are also missing these lines:
MQL5 Code:
__________________
Please, read the Forum Rules and the Signature Rules to avoid termination of your account. |
|
||||
|
thx for that. I got it to work, now I tired to modify it with my "real" indicator but this is not plotting. Please take another look
MQL5 Code:
|
|
||||
|
Indicator data array should be dynamic. And don't use ArrayInitialize(rlBuffer,EMPTY_VALUE) on it. Use PlotIndexSetDouble(0,PLOT_EMPTY_VALUE,EMPTY_VALUE) . Hope that helps.
__________________
Please, read the Forum Rules and the Signature Rules to avoid termination of your account. |
|
||||
|
I tried to test it myself but it gives strange information.
MQL5 Code:
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| QQE Indicator | Enivid | MetaTrader Indicators | 0 | 20th August 2010 09:10 |
| SAR Spy [MT4 Indicator] | x1nx0nx | MetaTrader Indicators | 0 | 28th December 2009 18:10 |
| RSI Signal (Buy\Sell Indicator) - GREAT signal indicator | MechXTrader | MetaTrader Indicators | 0 | 25th September 2009 08:34 |
| Wall Street is Showing Signs of Reverse | mercaforex | Fundamental Analysis | 0 | 25th August 2009 11:58 |
| MTF CCI Indicator | MechXTrader | MetaTrader Indicators | 0 | 3rd July 2009 04:35 |