Project 2 - [PLEASE CONTRIBUTE] Write to SQL Database EXAMPLE

Created at 13 Nov 2013, 18:29
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
jhtrader's avatar

jhtrader

Joined 15.10.2013 Blocked

Project 2 - [PLEASE CONTRIBUTE] Write to SQL Database EXAMPLE
13 Nov 2013, 18:29


This is an example on writing and reading from a SQL database

The database has two tables EUR, AUD, the tables have the following fields

currTime, pair, High, Low, Open, Close, SMA

On each bar

The robot reads the database and checks if the previous SMA is less than current SMA it writes 0; if the table has no data it does not do this.

If the condition is satisfied it then writes the HLOC and SMA to a database into a table AUD for the pair AUDUSD

and into the table EUR for pair EURUSD.