Trading Cash Session

Forums ProRealTime English forum ProOrder support Trading Cash Session

Viewing 15 posts - 1 through 15 (of 29 total)
  • #220789

    Hi – am wanting to just trade the cash sessions, and get OHLC prices from the cash session for SPY (SPTRD on IG) and not the 24hr priced product they offer.  For example, I want to know the open price of SPY (at 15:30 CEST) and OHLC for the previous day.  Is there a function that can be called?

    Thanks

    #220820
    JS

    Hi Fritz,

    Do you mean IG’s site or the ProRealTime (PRT) program…?

    In PRT there is the possibility to create functions / indicators and trading systems yourself…

    #220821

    Hi JS – I use PRT to trade with IG.  Most of their products price 24/7, so for SPY (SPTRD) there is no product that just trades the cash session.  I would like to take the OHLC for each cash session in PRT and use these in my algo.  If price close down 5 days in a row then buy would be price at close of cash session and not midnight which IG quotes.  Has a big impact on strategies.

    Thank you very much

    #220827
    JS

    Hi Fritz,

    I only know the CFD’s (Contract For Difference) and the futures of IG/PRT…

    What exactly do you mean by a “Cash Session”…

    #220832

    Fritz, I think I see what you mean, if we compare it with e.g. DAX. But please confirm.

    DAX closes at 22:00 (Amsterdam). But the session ends at 17:30. Don’t ask me when it opens thinking like this, but I would say 17:30 the previous day.
    So if this is what you mean, yes this makes a huge difference, often.

    For SPY/SPTRD this would mean 15:30 till 22:00. Here too the difference can be huge, because of Q figures reported at 22:00 or just past that. Especially when the big ones disappoint (e.g. AAPL).

    If this is what you mean, then the task is relatively easy : loop through those (RTH) hours and find the OHLC in there. Maybe someone can make you an example (I never have spare time for these things – sorry). When the example is there, you should yourself incorporate daylight savings.
    But first : is this what you mean ?

    #220835

    Hi Peter,

    Yes – this is exactly what I mean  Thank you for saying it so well.  For SPY/SPTRD this would mean 15:30 till 22:00.

    Thank you

    1 user thanked author for this post.
    #220836

    This is the code snippet for Daylight Saving of the past year. Mind you, this is about the difference with the US. You will need this for backtesting.

    For the near future : Wintertime in Holland/Germany starts on 29-10-2023. For the US this is 5-11. You will need this soon.

    Regards,
    Peter

    1 user thanked author for this post.
    #220848

    Thank you Peter, that will be needed as part of the solution.

    Please can someone tell me how I capture the open price at 15:30 and the close at 22:00 etc. for each day?

    #220864

    I thought to have read somewhere on this forum that daylight savings was automatically adjusted if the algo was started in its assigned timezone? I have done this with all of mine but also have several calendar reminders to check this is true.

    #220868

    Can you show us this text ? I mean, I recall it too but don’t know where I read it. Point is : this seems quite impossible OR impossible to handle well. I now like to look into it again.

    But :

    You guys over there are experts at solving these issues, because you have to (unlike us over here). So you very well can be right !

    1 user thanked author for this post.
    #220870

    PeterSt I have a very hard time finding anything I read on this forum a second time because it’s been designed by a programmer thinking in 1’s and 0’s. I save multible tabs for days if it’s relevant haha

    But for sure my earliest systems were/are time based opening drive systems and I made the rookie error of running everything in UTC +10. It was a nightmare interfering with the backtest and record keeping because of the bits and pieces after systems were switched over. Now I have to re-start every time I change instrument which seems insane but at least it gets things right enough. So now the backtest recognises/adjusted for daylight savings but I havn’t tackled one since earlier in the year. So best set a reminder to make sure is sure.

    Triple check everything in this business.

    #220872

    Daylight savings code
    Is that what you did ?

    But it should cover for aspects like I wrote about here.

     

    PS: Yes, finding things in this forum is virtually impossible. Oh, maybe the search gives results, but then dealing with the outcome pages – it is killing. I always use Google. E.g.:
    prorealcode daylightsavings

     

    #220926

    No I didn’t. But I’m glad you linked it for me, thanks. Just as easy to set a calendar reminder to double check this year and update the time in code if needed, but back tests work fine as long as I use Sydney time not Brisbane.

    But you know there are other ways to do it. Some of my codes just use volatility to switch on which gives the added bonus/or not of trading outside hours for volatility events. I suppose we’ll get one shortly!

    Also, I am now working on a giant regime filter using percentage ATR and dynamic position sizing. Early tests look promising and I can incorporate it into all algos and hopefully do away with time altogether. Then I can stop needing to schedule my margin on a timetable so much and simplify my tasks.

    #220933

    Please can someone tell me how I capture the open price at 15:30 and the close at 22:00 etc. for each day?

    Fritz, sorry to hijack your thread, I’ll bump your question back up.

    I’m not sure exactly what your saying, if you are looking to make a back test of your strategy or build a stock screener? You can try using the ProScreener section of the Forum.

    #220936

    Thanks coincatcha

    When I run algo on different platform that uses cash session prices eg for US products 15:30 to 22:00 the results are much better than when I run algo on IG continuous CFD equivalent.  Every time, without fail.  Price move sideways around midnight and erode O/N gaps etc.

    Attached screenshot show algo that on IG’s continuous CFD products suffer loss in 2018 which live algo trading the cash session with a different broker did not experience.  It make money that year and return profile very different, had better return.  This just simple example to make point.

    How to capture OHLC prices for cash sessions for an algo to reference?  Alternatively I could open an account with Interactive Brokers who offer cash session prices and not these continuous products.

    Thanks

Viewing 15 posts - 1 through 15 (of 29 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login