Download MetaTrader 5
To add comments, please log in or register
All Code Base apps are available from MetaTrader 5. You can publish your own one!
Agent86
915
Agent86 2015.01.08 20:05 
I'm confused about what I should be reading

Mql4 custom indicator properties vs Mql5 custom indicator properties.
 
When creating a custom indicator on mql4 it does indeed insert the OnInit() and OnCalculate() functions

For example:
From MQL5 - https://www.mql5.com/en/docs/constants/indicatorconstants/customindicatorproperties
SetIndexBuffer(0,MainBuffer,INDICATOR_DATA);

Should I use INDICATOR_DATA

OR
Should I stick with what is shown using F1 help reference in mql4 ?

Although Oniit() and Calculate() are used but did not want to mix other function usage that may not be allowed

Please advise
Carl Schreiber
5932
Carl Schreiber 2015.01.08 21:25  
Take some existing indicators and study them, save them under a different name and then change them acc. to your ideas...
Agent86
915
Agent86 2015.01.09 12:50  
Ok, thanks

I just wondered exactly how many mql5 features in the properties documentation that I could not actually use on my code platform ?

I have read some _plot properties and things cannot be used.
Also are the limitations of the number of indicators still going to apply or will this be cross compatible with mql5 after build 600 ?
Where there is no such limitation for the number of indicators buffers etc. ?

Please advise
Thanks again
honest_knave
951
honest_knave 2015.01.09 16:00  

My advice is to implement as much of the 'new style' / MQL5 as you can get to work with MQL4.

That will be the future, and the quicker you can transition the better.

The documentation is not fully updated, so sometimes you will need to experiment.

In response to your first query, the MQL4 documentation of SetIndexBuffer mentions the use of the data type parameter so why not use it?

Agent86
915
Agent86 2015.01.11 18:28  
honest_knave:

My advice is to implement as much of the 'new style' / MQL5 as you can get to work with MQL4.

That will be the future, and the quicker you can transition the better.

The documentation is not fully updated, so sometimes you will need to experiment.

In response to your first query, the MQL4 documentation of SetIndexBuffer mentions the use of the data type parameter so why not use it?

Ok,  thanks

Curious where is the locations of the default indicators, I've checked MQL4/Indicators and experts/indicators folders. Looked and searched all around in just about every folder in Metatrader

I cannot find the default indicators so I can open them in editor and take a look at them.

Please advise

Thanks

Keith Watford
Moderator
7875
Keith Watford 2015.01.11 19:50  
Agent86:


I cannot find the default indicators so I can open them in editor and take a look at them.
You can open the editor, then open the editor navigator (Ctrl D). then double click on what you want to examine
honest_knave
951
honest_knave 2015.01.12 18:03  
Agent86:
Ok,  thanks

Curious where is the locations of the default indicators, I've checked MQL4/Indicators and experts/indicators folders. Looked and searched all around in just about every folder in Metatrader

I cannot find the default indicators so I can open them in editor and take a look at them.

Please advise

Thanks


There is a new data structure - take a look here.

Note: I run everything in portable mode, which keeps the data structure as it was

gregkevin
11
gregkevin 2015.01.19 10:04  
Open the editor and navigate your problem .
/
To add comments, please log in or register