You just have to add it at the bottom after your own code.
In the examples, we will reference this code by the following tag ([excelcode]). When you find this tag, just replace it by the above code.

You must also add a reference to excel DLL in each script.
To do this:
- click on "Menu" button at the bottom of the script editor
- Select "Add references"
- Click on "Add Reference"
- Select "Microsoft.Office.Interop.Excel.dll" from the QuantShare folder

Exporting Strategy's Equity Line

Create a new money management script from "Analysis -> Advanced Money Management" then type the following code.

This script simply reads the first and second cell of an excel file and adds the data in the output (View -> Output). The data is read once a minute.
Donít forget to replace "filename" by your excel file location.

Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.