Importing orders #219
Is there a way to import orders from an array? I have them in an array that looks like [0,0,1,0,0,-1,-1...], length of this array is the same as the length of the data(one signal for each timeframe).
This is for backtesting only, the calculations are done outside of the testing script.
Or simpler, signals are saved in a csv with lines like this
As explained above order importing is not a feature of the the platform.
If you have the data in that format:
.... 2016-01-09;100200;-1 2016-01-10;110200;1 ...
there are several approaches:
Make a custom data feed with it containing only 2 fields
trigger(or any other name you wish)
In this case you would add the data feed to the system and could at each moment in time and synchronized with the data read if an order has to be executed or not
Read that input with something like a
pandas.read_csvmodule and during each call to
nextin the strategy, look for the corresponding
datetimeindex in the dataframe to see if an order has to be executed or not.