- ago
I would like to be able to call code such as "bars.market.IsOpenNow" when backtesting my ASCII data. Is there an example of how to get MarketDetails working when you aren't using a historical data provider?
0
429
Solved
1 Replies

Reply

Bookmark

Sort
Glitch8
 ( 11.81% )
- ago
#1
Yes, you can use the MarketManager to get an instance of any MarketDetails defined in the Markets & Symbols tool ...

CODE:
using WealthLab.Backtest; using WealthLab.Core; namespace WealthScript1 { public class MyStrategy : UserStrategyBase { //Initialize public override void Initialize(BarHistory bars) {          _market = MarketManager.FindMarket("CBOT");          DrawHeaderText(_market.Name); } //Execute public override void Execute(BarHistory bars, int idx) { }       //private members       private MarketDetails _market; } }
1
Best Answer

Reply

Bookmark

Sort