如何通过买卖报价生成Bar

Trade data is not always available from a data provider (FOREX on IB is a typical case). In this situation the only possibility to run a strategy requiring bar data is to build bars from quotes.

从一个data provider获取的市场数据不一定总是有效的(IB的外汇就是一个典型)。在这种情况下运行需要bar数据的策略的唯一方法是从quote建立bar。

  • click on IB market data provider in the Providers window

    在Providers窗口点击IB

  • switch to Properties window

    换到Properties窗口

  • expand BarFactory section

    展开BarFactory部分

  • select alternative Input (bid, ask, bidask, middle, spread) for the BarFactory

    选择BarFactory的Input(bid, ask, bidask, middle, spread)。