Time problem – 5min early
Forums › ProRealTime English forum › ProOrder support › Time problem – 5min early
- This topic has 5 replies, 4 voices, and was last updated 7 years ago by
robertogozzi.
-
-
06/17/2018 at 5:22 PM #73505
Hi
I am trying to get the market value at 10.10am using the 5min timeframe, but my code returns the time from 10.05. Can anyone help please??
I use the following variables…
12345marketopentime = 080000 //market open timemarketclosetime = 163000 //market close timestratstarttime = 101000 //start time of strategy in HHMMSS formatrisktime = 101500 //time that stop can be calculated and appliedvaliditytime = 102000 //stop time of strategy in time format (HHMMSS)Then I do the following logic check…
12345if time >= stratstarttime and time < risktime then// Check and enter trade paramstratopen = openBut when I graph the “stratopen” value it returns the open value from the 10.05 candle, not the required 10.10 candle.
Any help please?
Thanks.
06/17/2018 at 5:35 PM #73507Welcome to the forums. Please use the ‘Insert PRT code’ button when putting code in your posts. I will tidy your post up for you! 🙂
I would advise reading the documentation here:
https://www.prorealcode.com/prorealtime-documentation/
There is a whole section on Time and Date.
Also try using the GRAPH instruction with TIME and then you will see exactly what is returned for TIME for each bar.
Maybe you should consider OPENTIME?
06/17/2018 at 6:05 PM #73508OllieB,
You should try to move everything 5 mins early (stratstartime=100500), or maybe using stratstartime= opentime=101000
Regards.
06/17/2018 at 7:23 PM #7351906/17/2018 at 7:24 PM #7352006/17/2018 at 7:42 PM #73522Replace time < risktime with
1time <= risktime -
AuthorPosts
Find exclusive trading pro-tools on