ChartIndicatorAdd syntax

 
Please ChartindicatorAdd is used in MQl5, is there an alternative in MT4?. thank you.
 

Not exactly like that function, so that's a good reason to update to MT5.

But you can read a bit Here

 
MThomp:
Please ChartindicatorAdd is used in MQl5, is there an alternative in MT4?. thank you.

Save the current chart as template in files. Open the file and inject the xml data to load the indicator. Apply the template. 

 
nicholi shen:

Save the current chart as template in files. Open the file and inject the xml data to load the indicator. Apply the template. 

 Please i am not sure on how to 'inject the xml data to load the indicator' . Are there any links or detailed to notes on this Thank you.

 
A chart template doesn't use XML.
 
Alain Verleyen:
A chart template doesn't use XML.

...kinda looks like XML to me... 

<chart>
    id=131861128171735996
    symbol=AUDJPY_
    period=60
    leftpos=4081
    digits=3
    scale=8
    graph=1
    fore=0
    grid=0
    volume=0
    scroll=1
    shift=0
    ohlc=1
    one_click=0
    one_click_btn=1
    askline=0
    days=0
    descriptions=0
    shift_size=20
    fixed_pos=0
    window_left=182
    window_top=182
    window_right=1542
    window_bottom=564
    window_type=3
    background_color=0
    foreground_color=16777215
    barup_color=65280
    bardown_color=65280
    bullcandle_color=0
    bearcandle_color=16777215
    chartline_color=65280
    volumes_color=3329330
    grid_color=10061943
    askline_color=255
    stops_color=255
    <window>
        height=100
        fixed_height=0
        <indicator>
            name=main
        </indicator>
    </window>
    <window>
        height=50
        fixed_height=0
        <indicator>
            name=MACD
            fast_ema=12
            slow_ema=26
            macd_sma=9
            apply=0
            color=12632256
            style=0
            weight=1
            signal_color=255
            signal_style=2
            signal_weight=1
            period_flags=0
            show_data=1
        </indicator>
    </window>
</chart>
 
nicholi shen:

...kinda looks like XML to me... 

It's not XML, while we can agree it looks like.

XML would be (for example):

...
<window height="50" fixed_height="0">
  <indicator name="MACD" fast_ema="12" slow_ema="26" macd_sma="9" apply="0" color="12632256" 
             style="0" weight="1" signal_color="255" signal_style="2 signal_weight="1" period_flags="0" show_data="1">
  </indicator>
</window>
...

Let's say it's XMQL :-D

 
Alain Verleyen:

It's not XML, while we can agree it looks like.

XML would be (for example):

Let's say it's XMQL :-D

Fair enough... although they're using an XML parser and splitting the string between the tags on "\n", which BTW, in its current format, makes it easier to roll your own tpl file parser in pure MQL. 
 
nicholi shen:
Fair enough... although they're using an XML parser and splitting the string between the tags on "\n", which BTW, in its current format, makes it easier to roll your own tpl file parser in pure MQL. 

How do you know that ?

 
Alain Verleyen:

How do you know that ?

Deductive reasoning. The tags are obviously XML based, and as soon as you indent the string params (format it like I have in the post above) it breaks the template. So if you want to make your own parser, you'll have to split the string on \n. 

 
nicholi shen:

Deductive reasoning. The tags are obviously XML based, and as soon as you indent the string params (format it like I have in the post above) it breaks the template. So if you want to make your own parser, you'll have to split the string on \n. 

Ah ok. I thought you had maybe some interesting inside information :-D
Reason: