title: How to download data from an SQL-database and annotate an MT4-chart
body: <p>I have recently download the MetaTrader Terminal platform ( <code>MT4</code> ).</p>
  
  <p>I have my own back testing engine which stores some output in my SQL-server database. The output depends on the model I am testing. However, the output can just be as simple as the time of entry of a trade.</p>
  
  <p><strong>What I would like to know</strong></p>
  
  <p><strong>Is it possible</strong> in MQL4 to <strong><em>download</em></strong> data from a SQL-server database and then <strong><em>annotate</em></strong> the chart with a simple "<strong>B</strong>" for a buy entry or "<strong>S</strong>" for a sell entry?</p>
  
  <p>So I have run a back test simulation ( i.e. EURUSD from 2010 to 2011 ) and stored the time of the buy and sell entries. I would then like to go to my MetaTrader 4 platform and run a script which would download the time of all the buy and sell entries from my SQL-database and on my EURUSD chart label these XTO-s.</p>