Trading Cash Session
Forums › ProRealTime English forum › ProOrder support › Trading Cash Session
- This topic has 28 replies, 5 voices, and was last updated 1 year ago by FritzAlgo.
-
-
09/13/2023 at 1:27 PM #22093809/13/2023 at 2:57 PM #220944
Hi GraHal
Thank you for idea – I tried that but does not address issue. When I write an algo that says if close < close[1] or an indicator that derive it value from close, this is where the problem is. Close price on IG at midnight, not 22:00. Values are always different, introduce creep into prices which over time erode performance.
If I draw RSI[14] it take close price from IG, which is at midnight again, not 22:00. So even RSI value different to that of cash session.
09/13/2023 at 4:48 PM #220976What timeframe are you using on your Platform.
If you use 1 Hour timeframe then time can be to nearest hour, if you use 5 min timeframe then time can be to nearest 5 mins etc.
Timeframe(1 Hour, updateonclose)
If Time = 220000 and close < close[1] Then
Sell at Market
Ensdif09/13/2023 at 5:01 PM #22097709/13/2023 at 5:08 PM #22097809/13/2023 at 5:50 PM #220980Hi GraHal
I have full data. That not the issue. I can run algos on full data (continuously priced CFDs from IG 24/7 from Monday to Saturday) but performance worse than if I run same algo on actual stock market times (15:00 to 22:00).
Seems to be no way to reflect real market, or store market price at time of open (15:00) and close (22:00) each day to refer to instead.
Ok, I go back to other platform / broker for these algos
I am grateful for everyone help and quick ideas, thank you
09/13/2023 at 7:44 PM #220985Seems to be no way to reflect real market, or store market price at time of open (15:00) and close (22:00) each day to refer to instead.
So just to close the loop before you go … what was wrong with my idea … use Times in your code?
You can read and store (in your code) OHLC values at 15:00 and 22:00 … if you ask on here somebody will code it for you I’m sure.
09/13/2023 at 8:54 PM #22098809/13/2023 at 9:38 PM #220989It be best to open a new Topic with a Title which describes what you want, e.g.
Please – Code to Store OHLC values at Cash Market Hours.
Then you state what you want and the hours etc.
There are a few very helpful members on here, but they need a specification in words as to what needs coding else they may waste their very valuable time.
It’s also useful to be brief and to the point exactly what you want.
I just read back over your posts in this Thread and – am I understanding correctly – you want every OHLC value at open and close of cash session / exchange market hours … what, for the past month, 12 months or just yesterday??
Code would be very cumbersome to capture more than a few days worth of OHLC values.
Anyway, further discussions would be best in a new Topic if you want to continue?
09/13/2023 at 11:16 PM #220990If you’d ask me … this is ridiculous. After a handful of posts it was totally clear what needs to be done. Why open a new topic for it ?
It is only that apparently nobody likes to do it. Or can do it ? This includes me, and I told so (it would be the first from my hand as I exactly never do these things in this forum).Loop from 15:30 to 22:00 and register OHLC within that period. Actually High and Low would be sufficient, me thinks.
I recall that Fritz suggested that IBKR / PRT-IB would be able to do that automatically, but this is not something I automatically recognize. This is because ETH is explicitly dealt with by PRT, although that is a setting (want to trade ETH Yes/No). Thus, TF = 1 Day and then e.gf. High(Close[1]) ? I bet you that does not work out as desired; it will just incorporate the bars until 00:00.09/14/2023 at 8:30 AM #22100209/14/2023 at 9:03 AM #221005For everything a first time.
12345678910111213141516171819202122232425262728293031323334Once MyOpen = 0Once MyHigh = 0Once MyLow = 999999Once MyClose = 0If Time = 153000 thenMyOpen = OpenendifIf Time = 220000 thenMyClose = CloseendifIf Time >= 153000 and Time <= 220000 thenMyHigh = Max(Close, MyHigh) // Could be refined with Range and such.MyLow = Min(Close, MyLow) // Ditto.else // Reset all.MyOpen = 0MyHigh = 0MyLow = 999999MyClose = 0endifIf MyOpen <> 0 thengraphOnPrice(MyOpen) Coloured("Green") as "Cash Open" // Comment the others out and leave one active, views more comfortable.endifIf MyClose <> 0 thengraphOnPrice(MyClose) Coloured("Yellow") as "Cash Close"endifIf MyHigh <> 0 thengraphOnPrice(MyHigh) Coloured("Red") as "Cash High"endifIf MyLow <> 999999 thengraphOnPrice(MyLow) Coloured("White") as "Cash Low"endifOf course it requires some more, like undoubtedly the requirement to look at the High etc. from the previous day.
09/14/2023 at 9:13 AM #22100909/15/2023 at 8:49 AM #221072 -
AuthorPosts
Find exclusive trading pro-tools on