Daysforbiddenentry support

Forums ProRealTime English forum ProOrder support Daysforbiddenentry support

Viewing 8 posts - 1 through 8 (of 8 total)
  • #135930

    Hi Guys n Gals

    Just a quick check on logic here as the code below is opening trades on weekends Sunday evening, which I would rather avoid due to spreads. Should I remove the “and not”? I did send a query on it to PRT via help with no reply yet.

     

    #135934

    You don’t say what time frame you are running the strategy on. The code will allow trades to open from midnight at the end of Sunday. If you are on a daily chart then as all decisions are made at the close of a candle then this is what will happen. If you are on a faster time frame and want trades to open only after a specific hour on Monday then you have to tell your strategy that this is what you want.

     

    #135935

    This will let you select days and different times each day, overnight or not https://www.prorealcode.com/topic/time-and-day-conditions/.

     

     

    #135945

    You don’t say what time frame you are running the strategy on. The code will allow trades to open from midnight at the end of Sunday. If you are on a daily chart then as all decisions are made at the close of a candle then this is what will happen. If you are on a faster time frame and want trades to open only after a specific hour on Monday then you have to tell your strategy that this is what you want.

    OK thanks. All my strategies run on 7hrs or 4hrs currently, also 9hrs previously. I assumed as it was from the inbuilt program coding that it wouldnt trade on Sat / Sunday. I can see a need ot code it in though, so will take  alook at the code Robert  refers to and try out…

    #135946

    This will let you select days and different times each day, overnight or not https://www.prorealcode.com/topic/time-and-day-conditions/.

    Cheers. Yes I now recall I’ve seen that somewhere in code here on the forum. I can see a need to code it in, but assumed it should work if from the simple programming code. I’ll take a look at that and see how it does. Thanks… It will be a stock paste into all code for weekend.. 🙂

    #135948

    but assumed it should work if from the simple programming code.

    Maybe it would if you used CurrentDayOfWeek (not opendayofweek)?

    #135971

    I did think it might be related to timezone, I think it may have been the Dax, but that’s the same timezone as me which is London. I’ll see how the code fairs..

    #135973

    but assumed it should work if from the simple programming code.

    Maybe it would if you used CurrentDayOfWeek (not opendayofweek)?

    Thanks GraHal

    Yes that actually makes sense, though bearing in mind timezone for the instrument. May be worth a try if I just want to blanket Sat/Sunday easily

     

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

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