Just working on backtests using the formula wizard and trying to work with getTIme to determine times of trades.. having some problem making it work correctly. As in the extract below.. in the wizard I add lines to select the date to == 26 in this case for yesterday... the hour to be >= 14 (my local time ) and minute >=35
now what that does is allow any trades after 14.35 which is what I want... but it also does NOT allow any trades that the minutes are not past 35 also.. eg a trade is alowed at 16.40 but not 16.12.. how do I get it to allow trades at ANY time past 14.35? Can that be done in the wizard or do I need to edit separaetly in editor?
if (
vEMA20.getValue(MAStudy.MA) > vEMA50.getValue(MAStudy.MA) &&
getDay() == 26 &&
getHour() >= 14 &&
getMinute() >= 35
) onAction1()
now what that does is allow any trades after 14.35 which is what I want... but it also does NOT allow any trades that the minutes are not past 35 also.. eg a trade is alowed at 16.40 but not 16.12.. how do I get it to allow trades at ANY time past 14.35? Can that be done in the wizard or do I need to edit separaetly in editor?
if (
vEMA20.getValue(MAStudy.MA) > vEMA50.getValue(MAStudy.MA) &&
getDay() == 26 &&
getHour() >= 14 &&
getMinute() >= 35
) onAction1()
Comment