# What your code runs on

## Your own data

A run uses history you bring. Each upload becomes a dataset that belongs to your account and is private to it. A dataset holds one symbol, written as 3 to 12 capital letters.

A file is uploaded in parts, so a large file can resume after an interruption. When the last part has arrived the dataset is converted and checked, and it moves from uploading to ready, or to failed with the reason.

## Formats

| Source                                        | What Forge reads       |
| --------------------------------------------- | ---------------------- |
| MetaTrader 5                                  | Tick and bar exports   |
| MetaTrader 4                                  | Bar exports            |
| OANDA                                         | Candle exports in JSON |
| QuantDataManager, Dukascopy, TrueFX, HistData | CSV files              |

A CSV file can use a comma, semicolon, tab or vertical bar as its separator, a point or a comma as its decimal mark, and UTF-8 or UTF-16 text. Forge reads the layout from the file and shows it to you before anything is converted, so you confirm which column is the time and which are the prices.

## The clock of each source

A file carries its source's own clock, and Forge converts it to UTC.

| Source                   | Clock                                              |
| ------------------------ | -------------------------------------------------- |
| MetaTrader 4 and 5       | The broker's server time                           |
| Dukascopy, TrueFX, OANDA | UTC                                                |
| HistData                 | A fixed five hours behind UTC, with no summer time |
| QuantDataManager         | Measured from the data itself                      |

> **Trap.** A file from a broker terminal is in that broker's server time. A dataset converted with the wrong clock puts every session hours away from where it happened.

## What is checked

Every row is read and checked. A row that cannot be used is dropped and counted under a named reason. The reasons include a line that cannot be parsed, a truncated last line, a time that goes backwards, a price that is missing, not a number or not above zero, a duplicate row, quotes where the bid is above the ask, and outliers in the spread or the price.

Forge also compares the time zone a file declares with what the data itself shows. When the two disagree by more than a set tolerance, the dataset is flagged before you run on it.

## The broker's own history

The chart can also draw history from the Deriv public feed. It is a short window: candles go back about a year and ticks about a day. A request outside the window is not refused and returns the latest data instead, so the dates on the result matter.
