I'm struggling to enter at the day close correctly.
I have two data series:
1. timeframe day
2. timeframe 1m
So, what is the approach:
1. On day timeframe I analyze specific metrics as signals to enter
2. On a minute timeframe I enter and exit positions
In the strategy I have
endDateTime_RTH = new DateTime(Time[0].Year, Time[0].Month, Time[0].Day, 14, 59, 0);
if(BarsInProgress == 0)
{
if(Condition1 > 120){
LongCon1 = true}
if(ConditionExit <= 0.5)
{
LongExit = true
}
}
if(BarsInProgress == 1)
{
if(LongCon1
&& Time[0] == endDateTime_RTH
)
{
EnterLong (0, 1, RegularLong);
}
if(Position.MarketPosition == MarketPosition.Long
&& Time[0] == endDateTime_RTH
&& LongExit
){
ExitLong();
}
Thank you!

Comment