Oil daily problems
Forums › ProRealTime English forum › ProOrder support › Oil daily problems
- This topic has 7 replies, 3 voices, and was last updated 5 months ago by druby.
-
-
06/25/2024 at 11:50 AM #234333
Hi
I have an algo that trades oil on a daily chart. I have this problem that oil is closed the hours 00:00-02:00 Tuesday-Friday, but my algo tries to take a position at 01:00 a clock which results in a error and that the algo shuts down. When I do backtest there is no problems but live it does not work. I tried the solution to limit the hours the algo can trade to not take a position before 02:00 but this results in 0 trades.
There must be some easy fix that I am missing
06/25/2024 at 12:12 PM #23433406/25/2024 at 12:23 PM #23433506/25/2024 at 12:32 PM #234336Yes I have tried both solutions from @GraHal and @druby, and the result will be the same, the algo makes 0 trades. I have the same algo running on daily for naturalgas with no problems, as naturalgas dont have this 2h break between 00:00-02:00.
06/25/2024 at 12:58 PM #23433706/25/2024 at 1:38 PM #234338I’m not up to speed in running algo’s, so this may be at bit of BS.
I started scratching head when you mentioned, ‘Market closed’ and ‘ tries to take position’.
@GraHal brings up a good point.
If your algo is on daily, and lets say the code only action’s events at the close of a daily bar,
then does that mean that even if the code recognised the market was in the closed area,
it couldn’t action the change till the end of a bar, whereby the halt condition is no longer true.
And therefore, setting an halt at the beginning of the day, and, with a change in the middle of the day, wouldn’t get actioned till the end of the day.
Where it all repeats, possibly with no trades.
This seems to explain while messing around with the time on daily, doesn’t give logical results regarding actions taken.
Regarding , why it tries to take order when market shut, still scratching head.
Unless you can make orders all the time, and get the error, if market shut.
But, what made condition true…
06/25/2024 at 1:56 PM #234339What I think is happening
1 Algo only buys on the open of a new candle
2 Algo thinks new candle opens at 01:00
3 Market is closed 00:00-02:00 so impossible to make a tradeSidenote: Back in March when US started Summertime before us, Brent was closed 23:00-01:00 so the algo worked fine then
Attachment
Algo trying to get a position every second for about 5 min before giving upMb found a work around, looks like US-Crude don’t have this 2h break or any break at all and should work to trade on the daily
06/25/2024 at 2:17 PM #234341 -
AuthorPosts
Find exclusive trading pro-tools on