Help catch market opening time breakouts

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #138890 quote
    boonet
    Participant
    Senior

    Apart from requesting help with some code, this post is an amalgamation of thoughts, strategies and codes snippets.

    How do you tackle the insane volatility and volume of DJI/DOW right at the start of market (14:30 BST, -9:30 Eastern Time)

    This is what happened to me today – “I was +200 pounds in profit and the minute NYSE stock market opened in the US, the COVID sentiment brought the DJI value about 600points down” .

    If you had to automate something within my strategy. How would you do it?

    Scenarios to consider:

    • How to make most of opening times breakouts?
    • What should be done with ongoing trades, if in profit?
    • What should be done with ongoing trades, if drawdown?

    Please help me with anything you already do within your strategy. Appreciate your ideas, thoughts and especially code snippets.

    Thanks in advance.

    #138896 quote
    Dow Jones
    Participant
    Veteran

    Just an opinion. I guess it depends on your strategy (speculative, trend, etc…). I have speculative strategy that trade after 9.30 EST only, no trade before that and generally small stop loss. But also have trending strategy that trade all the time, with slightly bigger stop loss. If you play with higher time frame, the effect should be less visible, as you don’t aim or mind the spike of volatility at that moment. If the trend is right, the increasing volatility is an edge. Depends on strategy, I may have exit trigger sometimes depends on the open market sentimental.

    One example I added to the MotherOfDragon strategy is here, (code is for UTC+8, adjust the time accordingly to your time zone)

    // ---------   US DAY LIGHT SAVINGS MONTHS      ---------------- //
    mar = month = 3 // MONTH START
    nov = month = 11 // MONTH END
    IF (month > 3 AND month < 11) OR (mar AND day>14) OR (mar AND day-dayofweek>7) OR (nov AND day<=dayofweek AND day<7) THEN
    USDLS=010000
    ELSE
    USDLS=0
    ENDIF
    
    once openStrongLong = 0
    once openStrongShort = 0
    if (time <= 223000 - USDLS and time >= 050000 - USDLS) then
    openStrongLong = 0
    openStrongShort = 0
    endif
    
    //detect strong direction for market open
    once rangeOK = 40
    once tradeMin = 1500
    IF (time >= 223500 - USDLS) AND (time <= 223500 + tradeMin - USDLS) AND ABS(close - open) > rangeOK THEN
    IF close > open and close > open[1] THEN
    openStrongLong = 1
    openStrongShort = 0
    ENDIF
    IF close < open and close < open[1] THEN
    openStrongLong = 0
    openStrongShort = 1
    ENDIF
    ENDIF
    
    once bollperiod = 20
    once bollMAType = 1
    once s = 2
    
    bollMA = average[bollperiod, bollMAType](close)
    STDDEV = STD[bollperiod]
    bollUP = bollMA + s * STDDEV
    bollDOWN = bollMA - s * STDDEV
    IF bollUP = bollDOWN THEN
    bollPercent = 50
    ELSE
    bollPercent = 100 * (close - bollDOWN) / (bollUP - bollDOWN)
    ENDIF
    
    //Started real wrong direction
    once strongTrend = 60
    once strongPeriod = 8
    once strongTrendGap = 2
    IF shortonmarket and openStrongLong and barindex - tradeindex < 12 and summation[strongPeriod](bollPercent > strongTrend) = strongPeriod - strongTrendGap then
    exitshort at market
    ENDIF
    
    IF longonmarket and openStrongShort and barindex - tradeindex < 12 and summation[strongPeriod](bollPercent < 100 - strongTrend) = strongPeriod - strongTrendGap then
    sell at market
    ENDIF
    boonet thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Help catch market opening time breakouts


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
boonet @boonet Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Dow Jones
5 years, 7 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 07/10/2020
Status: Active
Attachments: No files
Logo Logo
Loading...