gfxParticipant
Average
Hi,
Has anyone already built a piece of code to optimise trading time ?
I currently use TIMEFROM = 080000 and TIMETO = 170000 to define my trading hours.
Is there anyway to back test with optimisation of trading hours to get the best time to trade?
Thks,
B.
gfx
Set optimization for each time from, say, 060000 to 100000 step 010000 (1 hour) or 003000 (half an hour) or 000100 (1 minute).
Always write 6 digits, don’t mind if leading 0s are later dropped.
thanked this post
@ robertogozzi
it’s an old post, but here again the question of how to optimise times?
the suggestion from die doesn’t seem to work, as no leading zeros can be entered.
greet
Suffi
Don’t worry, leading 0s are always dropped, you enter 001000 (10 minutes), they are then converted into number 1000, It’s OK.
Of course if you set a 003000 minute step, from 080000 to 200000, it will optimize 080000, 083000, 086000, 089000, then 092000, etc… which is not correct!
Use always 010000 hour steps, or 000100 1-minute steps, but in this case many optimization steps will have to be ignored.
It can’t be accurate as maths with dates and times are not supported.
Hi & Happy New Year,
to optimise the trading hours in my systems I use this way:
if (condition) and (hour=>H1 and hour<=H2) then ………….
where H1 and H2 are the optimised trading hours.
You can also add the minutes in the same way (from 0 to 59)