I am trying to build a strategy which looks at last 2 day's return and trade the most winning/losing stocks.
I have trouble calling sid() with index of a dataframe
for example, if i want to trade the first stock in the dataframe below
p = history(bar_count=2, frequency='1d', field='price')
order(sid(p.columns[0]), 1000)
The system gives me the error:
Error The sid(id) method takes one parameter.
but p.columns[0] is an int, how come it dosn't work with sid?
Thanks!