A little help with custom indicator.

 

Hi everyone. Hope you are doing good.

I have created many indicators in mql4. Now I'm converging towards mql5 and trying to create indicator in mql5.

Can anyone let me know what I'm doing wrong here. Cause I've tried multiple things but wasn't able to sort out that why my 2nd buffer is not showing in data window.

I'm attaching the file below. Please let me know.

Cause I think MQL5 is kind of complex though its advance than MQL4.

If the file runs perfectly on your terminal. Please let me know.

Edit: I'm not intended to plot any kind of object on the chart using #property indicator_plots.

MQL5: Create Your Own Indicator
MQL5: Create Your Own Indicator
  • www.mql5.com
What is an indicator? It is a set of calculated values that we want to be displayed on the screen in a convenient way. Sets of values are represented in programs as arrays. Thus, creation of an indicator means writing an algorithm that handles some arrays (price arrays) and records results of handling to other arrays (indicator values). By describing creation of True Strength Index, the author shows how to write indicators in MQL5.
Files:
BD.mq5  2 kb
 
I recommend creating a template using the 'MQL Wizard'.
 
Vladimir Karputov:
I recommend creating a template using the 'MQL Wizard'.

I'm already doing that but not adding any kind of plots in the wizards.

 
Hafiz Tamur Ahmed :

I'm already doing that but not adding any kind of plots in the wizards.

First, think about what styles of plotting should be in the indicator (line, histogram, Arrow ...). Then create a template using the 'MQL Wizard'. Then show the code and start asking questions.

 
Vladimir Karputov:

First, think about what styles of plotting should be in the indicator (line, histogram, Arrow ...). Then create a template using the 'MQL Wizard'. Then show the code and start asking questions.

I have already attached the file. To look at its mql5 file. And Also I want custom graphical objects to be represented on the chart i just want my buffers to save values and buffers should be represented in data window.

 
Hafiz Tamur Ahmed :

I have already attached the file. To look at its mql5 file. And Also I want custom graphical objects to be represented on the chart i just want my buffers to save values and buffers should be represented in data window.

The file after the MQL Wizard CANNOT CONTAIN edits. Create a file. Attach a file.

 
Vladimir Karputov:

The file after the MQL Wizard CANNOT CONTAIN edits. Create a file. Attach a file.

Sorry! I didn't understand!

 
Hafiz Tamur Ahmed :

Sorry! I didn't understand!

Task # 1: Open the 'MQL Wizard'

Task # 2: Create an indicator

Task # 3: Attach the code!

 
Vladimir Karputov:

Task # 1: Open the 'MQL Wizard'

Task # 2: Create an indicator

Task # 3: Attach the code!

Here it is!

Files:
BD.mq5  2 kb
 
Hafiz Tamur Ahmed :

Here it is!

Why are you trying to deceive me ??? Follow three easy steps:

Forum on trading, automated trading systems and testing trading strategies

A little help with custom indicator.

Vladimir Karputov, 2021.07.03 20:03

Task # 1: Open the 'MQL Wizard'

Task # 2: Create an indicator

Task # 3: Attach the code!


 
Vladimir Karputov:

Why are you trying to deceive me ??? Follow three easy steps:


I'm not trying to deceive you. I think you haven't understood the problem. Anyhow thanks for the help. 

Reason: