charts
Generating Bars
Creating a chart by generating bars is the first step to building an algorithm. This chart represents the price action of your chosen asset and will be used to test your trading ideas.
Selecting Data Range
You have flexible options for selecting the data you want to use:
By Months
When you open the model builder, the default data range is the last 6 months. This gives you a recent snapshot of the market.
- Presets: Quickly select a period from 1 month to 1 year.
- Custom Range: Need more control? Define your own specific start and end months.
By Count
This option generates the specified number of bars, regardless of the time period they cover.
- Default: Starts with 2500 bars leading up to the present moment.
- From Timestamp: Generate a specific number of bars starting from a chosen date and time.
- Up to Timestamp: Generate a specific number of bars leading up to a chosen date and time.
By Timestamps
This option generates bars from the underlying asset data, limited to the start and end timestamps you specify. This allows for precise selection of a specific period for analysis.
Bar Settings
Bar settings control how the market data engine transforms raw asset data into the bars on your chart. This might sound complicated, but it's all about how you want to organize and view the price action. Think of it like choosing different lenses to examine the market.
Count
This setting compiles bars simply by counting the number of data points. For example, if you select 1000, the engine will generate 1000 bars from your chosen data range.
- Gaps Included: This setting takes into account gaps in the data, such as weekends and overnight periods. This means that each bar can cover a different amount of time.
- Robustness: This method is generally more robust than time-based closes, as it's not affected by market closures or irregular trading hours.
- Useful for:
- Uploaded data: If you've already organized your data into daily or weekly bars.
- Non-time-based bars: If you're working with tick or volume bars where time isn't the primary factor.
Time Period
This is a time-based compiler that calculates closes from the start of each day at 00:00.
- Flexible Settings: The setting doesn't have to perfectly divide into the number of minutes in a day (e.g., you can use 17-minute bars).
- Common Settings: 60 for hourly bars, 240 for 4-hour bars, etc.
- Useful for: Finding opportunities that standard trading platforms might miss due to their fixed intervals.
Time Sync
This advanced setting allows you to generate bars at specific times of the day.
- Precise Timing: Enter a comma-separated list of times (e.g., 09:30,16:30,19:30).
- Useful for: Manual execution strategies where you only want to take action at certain times.
Triple Barrier
This setting combines time-based bar generation with a volatility trigger.
- Time and Volatility: Bars are created at the time-based trigger, or if the price movement within the bar exceeds a certain threshold.
- Useful for: Balancing data smoothing with responsiveness to sudden price changes.
Volatility
This setting generates bars based on price movement (volatility).
- Accurate Closes: Closes are placed at actual market levels, not at "fake" trigger levels.
- Example: If your trigger is 10 pips, but the price moves 12 pips, the bar closes at the 12 pip level.
Anti-Aliasing
This innovative approach reduces noise during sideways market action.
- Clearer Trends: Accentuates directional movement while compressing sideways movement.
- Useful for: Identifying trends and filtering out noise.
Exotic Combinations
Combine time-based and volatility-based settings to create unique charts that reveal hidden market behaviors. This can lead to algorithms that perform differently than those based on traditional time-based charts.
Experimenting
Try combining different settings to see how they affect your chart and your algorithm's performance.
Example:
Combine Time Sync at key times of the day with Volatility bars to highlight volatile periods, and add Anti-Aliasing to further emphasize directional volatility. This could be a powerful combination for a trend-following algorithm.