Description
This indicator draws Ask-based High and Low price lines as an overlay on any chart. Since cTrader stores all historical bars as Bid prices, the Ask lines are calculated by adding a fixed spread to the Bid High and Bid Low of each bar.
Parameters:
- Spread Override (Pips): The spread value to add to each bar. Set this to the typical spread of your broker for the symbol you are analyzing. A value of 0 uses the current live spread, which is not historically accurate and not recommended for backtesting analysis.
- Show Ask High: Toggles the Ask High line.
- Show Ask Low: Toggles the Ask Low line.
Limitations:
Historical Ask prices are not available through the cTrader indicator API. There is no historical spread series exposed to indicators, only to cBots running in OnTick. This means the spread applied to all historical bars is a fixed approximation, not the actual spread that existed at the time each bar formed.
Use cases:
Best applied if you only need an 1. average added or 2. you want to visually backtest certain trades from your algo to check e.g. if Ask-Price would be hit.
An easy way to get the spread is via comment in your trade order:
string comment = string.Format("Spread:{0:F1}", Symbol.Spread);
The current live bar uses the real-time Symbol.Ask value from the broker feed, which is accurate.
