Hi,
Can anyone help me with the following code please? I want to check whether the first candle is green or red on 5 min timeframe for any particular day.
The following code gives me stocks with last candle green but instead I just want the first one. Thanks!
input OpenTime = 0930;
input CloseTime = 0935;
input Date = 20240614;
def d = GetYYYYMMDD();
def Active = SecondsFromTime(CloseTime) > 0 and SecondsFromTime(OpenTime) >= 0;
def green = if(Active and d and open<close) then 1 else 0;
plot scan;
scan = green==1;
Can anyone help me with the following code please? I want to check whether the first candle is green or red on 5 min timeframe for any particular day.
The following code gives me stocks with last candle green but instead I just want the first one. Thanks!
input OpenTime = 0930;
input CloseTime = 0935;
input Date = 20240614;
def d = GetYYYYMMDD();
def Active = SecondsFromTime(CloseTime) > 0 and SecondsFromTime(OpenTime) >= 0;
def green = if(Active and d and open<close) then 1 else 0;
plot scan;
scan = green==1;