Close all Postion after 15:00 and generate exploration signal

Hi forks,
I want to close all intraday position before the market close. I use exploration to generate close signal. below is my code and exploration result after 15:00.

However, it does not generate any sell cover signal. Could you please help?

tn = TimeNum();
startTime = 93000; // start in HHMMSS format
endTime =153000;  // end in HHMMSS format
timeOK = tn >= startTime AND tn <= endTime;

condition1=Cross(O,HVB ) AND timeOK;
condition2=Cross(LVB,O) AND timeOK;
Buy = condition1;
Short =condition2 ;
Sell = condition1 OR TimeNum() >= 150000;
Cover= condition2 OR TimeNum() >= 150000;

Filter = Buy OR Short OR Sell OR Cover; 	

AddColumn( Buy, "Buy" );
AddColumn( Sell, "Sell" );
AddColumn( Short, "Short" );
AddColumn( Cover, "Cover" );


This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.