| Easy financial chart - Write you own formulas |
|
Easy financial chart provide a flexible way to embed your own formulas. You can bundle all you formulas to a dll file, put it to the plugins subfolder, then it will be loaded automatically when main program start.
Here I make a file called demo.fml in \Program Files\Easy
Financial Chart\WindowsDemo\bin\debug\plugins folder , it's the
source code of plugin dll . Open it using formula editor. (figure 1)
Expand the left tree to find the MACD formula.(figure 2)
There are three parameters in this formula, LONG,SHORT and M. These parameters
are referenced by the formula program.
Let's see the first line : DIFF : EMA(CLOSE,SHORT) -
EMA(CLOSE,LONG); The second line means that the exponental moving average of the last "M" days of DIFF. DIFF is the value returned by the first line.
The third line means that first line subtract the second line , the result
multiply by 2. and show this line in a style of COLORSTICK.
Let's open WindowsDemo.exe , You can see how the MACD formula is drawn in the
chart.(Figure 4)
Modify the MACD formula , and see what happens.
Right click MACD in the tree, add the parameter M2.(Figure 6)
Press F9 to Compile.
Press F9 again.
Open WindowsDemo.exe again. You will see two extra lines shown in the
chart.(figure 9)
You can double click the formula area to change the formula parameters.(figure
10)
Define which formulas can be selected in the chart at App.config. |
|
Quick Formula Script Language Guide Any questions? feel free to contact me! http://finance.easychart.net |