Trading Systems and Money Management : A Guide to Trading and Profiting in Any Market

(やまだぃちぅ) #1

  1. The first part of the code only needs to be done once, on the very first bar on
    the chart. Within that part of the code, we make sure that the first day to be
    exported is 2,500 days prior to the last day of the chart.

  2. This code also transforms the TradeStation data format to Excel date format.

  3. The first piece of code that needs to be repeated for every bar makes sure that
    all data from all markets are synchronized and will fill in all missing days,
    such as holidays, with yesterday’s data. It too transforms the TradeStation
    data format to Excel date format.

  4. The code now starts to look for position changes and alters the values of the
    variables to be exported, depending on how the position changes from day
    to day.

  5. The final daily export starts with another transformation of TradeStation
    dates to Excel dates.


342 PART 4 Money Management

Free download pdf