Hi all, I’m a complete beginner to coding with ProRealTime and I’d appreciate it if anyone could help me out.
What I’m trying to do is code a system where I enter the market at 12pm everyday and bet against the trend since midnight that same day.
So for example the system would start at midnight then check the price at 12pm (midday). If the market has gone down, it would buy. If the market has gone up, then it would sell.
I know of course that this isn’t the most profitable system but it’s more for me to get to grips with the actual coding rather than making any profit at the moment.
If anyone could help me out I’d really appreciate it, thanks!
WingParticipant
Veteran
if time=120000 then
if dclose(1)>close then
buy 1 lot at market
endif
if dclose(1)<close then
sellshort 1 lot ar market
endif
endif
Does that work?
That works, thank you very much, its so much simpler than I thought!