backtest: close short position after 5 days

#1
I have my trading rule to short the index (or long put)
short = cross (MA50, MA10)

I expect to hold 5 days for my short position and close the short position. I dont know how to write it. please help.

I would like to do the backtesting, but it said i don't have buy/sell? please help
 

johnnypareek

Well-Known Member
#2
I have my trading rule to short the index (or long put)
short = cross (MA50, MA10)

I expect to hold 5 days for my short position and close the short position. I dont know how to write it. please help.

I would like to do the backtesting, but it said i don't have buy/sell? please help
short = cross (MA50, MA10);
COVER=REF(SHORT,-1);
 

johnnypareek

Well-Known Member
#3
I have my trading rule to short the index (or long put)
short = cross (MA50, MA10)

I expect to hold 5 days for my short position and close the short position. I dont know how to write it. please help.

I would like to do the backtesting, but it said i don't have buy/sell? please help
short = cross (MA50, MA10);
COVER=REF(SHORT,-5);
 

Similar threads

Trade in Rs 20, No more % brokerage

Name:Phone:
Email:City:
State:
Are you a day trader?