HOURLY BIAS

Viewing 9 posts - 1 through 9 (of 9 total)
  • #181100

    Hi Guys, I tried to write a code about hourly bias (from 00:00 to 10:00)  but TS doesn’t open some trade.

    It opened a trade at 01:00 and close at 02:00  CORRECT

    no opened a trade at 02:00 and close at 03:00 UNCORRECT

    It opened a trade at 03:00 and close at 04:00  CORRECT

    no opened a trade at 04:00 and close at 05:00 UNCORRECT

    can you help me?

     

    #181102

    Do it everywhere like this and it will start to respond as expected :

     

    #181107

    Defparam CumulateOrders = true ?

    #181112

    Sunday is 0, not 7.

     

    #181130

    I Tried this way but the problem is the same.

    #181131

    try this

     

     

    #181132

    The OnMarket status is updated the bar AFTER a trade is closed, so line 18  will not be executed at 010000 since a trade has just been closed but will be reported next bar, at 011500, so it will be skipped. There can’t be 2 trades opened at the same time.

    This is because you set line 1 to FALSE. Set it to TRUE, instead.

    #181144

    It’s the same, it doesn’t works.

    #181161

    Firstly, OpenDayOfWeek changes when the DAILY candle changes, so:

    • now, without DST, it changes at 00:00 (Utc+1) at the same time the DAY changes
    • when DST is active, it changes at 01:00 (Utc+2), while the DAY changes as usual at 00:00 (Utc+1), so there’s ONE whole hour when it’s reported as a new DAY, but as the old DAYOFWEEK. Adding GRAPH OpenDayOfWeek will help spot it on Mondays, when the 00:00 trade is never opened.

    Secondly, as I said in my previous post, ProOrder needs a whole bar to be aware of any update uf the OnMarket status, so when at 02:00 you want to close a trade, it DOES, but it can’t open a new one because the confirmation of the exit will be received from the broker after the new bar has started forming and can be dealt with only when it closes. If you replace any BUY time with minute 1500 (or 0100 if you use a 1-minute TF) instead of 0000, everything will run smoothly.

     

Viewing 9 posts - 1 through 9 (of 9 total)

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