No new trades at time / existing trades don't close

Forums ProRealTime English forum ProOrder support No new trades at time / existing trades don't close

Viewing 12 posts - 1 through 12 (of 12 total)
  • #62797

    Hello,

    is it possible that there are no new trades opened by the system at 22 o clock but the positions which are still open will not be closed?

    Thanks a lot

    #62801

    No position is closed until you tell the system to.

    You may use SELL/EXITSHORT or DEFPARAM FLATAFTER.

    #62805

    Hello,

    I don’t use DEFPARAM flatafter but I use DEFPARAM flatbefore. So the system closes at 000000. That’s what I told the system so I understand that.

    But how can I tell otherwise that the first trade should not be opened before 10 o clock and run till the stop or target is reached (maybe that can take even some days)

    #62824

    You shouldn’t use either DEFPARAM FLATBEFORE nor DEFPARAM FLATAFTER. You should, instead, use variables to set your desidered time interval.

     

    1 user thanked author for this post.
    #64208

    This is what I’m trying to use but I have a problem or I moreover I believe PRT has a problem.

    My platform is set the Australian Eastern Standard Time and I don’t want any trades to open on Saturday after 05000. It sort of works with the TIME function but it also stops trades on Friday. I’ve tried to set endOfWeek = 6 but that doesn’t work. Am I missing something simple? Or is this really a PRT time/day issue?

     

     

     

     

     

     

     

    #64213

    Isn’t below your problem? Where is your Sell condition??  Aren’t you exit /  Sell at the next bar after Entry or maybe even Buy then Sell one after the other in the same Bar?

     

     

    #64217

    Monday is 1, while 0 is Sunday.

    I tested it on Aud/Nzd, h1 and the output (with GRAPH) is:

    • at 22:00 UTC+0 both DayOfWeek and OpenDayOfWeek (or CurrentDayOfWeek) return the same value (0=sunday, 1=monday,…)
    • at 23:00 UTC+0 OpenDayOfWeek returns the current day (0 on Sunday,…) while DayOfWeek returns the next day (1 on Sunday, 2 on monday,…)

    it appears that the discriminating factor is 23:00 UTC+0 (00:00 CET).

     

    1 user thanked author for this post.
    #64221

    Robert thanks for checking with your set timezone. I thought this would be the case so this to me reconfirms this is a IG PRT issue with Days timezone.

    Please remember for me the Monday is working fine with it set to “0” even though I know technically this is Sunday but it works, that’s what’s important (note setting DayOfWeek = 1 : doesn’t work) but my major issue is the Friday and Saturday problem.

    As you can see on Friday after it stops making trades and then on Saturday at 00:00 it starts making again but then stops at 050000 as it’s supposed to by why does it stop trading on Friday? It shouldn’t.

    Grahal yes you’re sought of right (I suggest you re-read my problem description ), the code SELL ON MARKET is somewhat superfluous because there’s the pProfit/pLoss but I’ve included to make sure it closes the position every hour so that we can see when it is or isn’t working to execute BUY as per the time instructions. The problem is that it doesn’t execute BUY trades on Friday after 11:00 AEST but it should.

    1 user thanked author for this post.
    #64225

    As for ONMARKET, it takes one candle to be true, so your code will allow one bar before any trade is closed.

    To close immediately after a BUY within the same candle the code should be:

    even if I can’t figure out what use it would be, unless for some debugging purposes.

    1 user thanked author for this post.
    #64244

    hi guys

    I’m a rookie, but I think there isn’t a ZERO day.

    Monday is 1

    sunday is 7

     

    that’s what I knew.

    Am I wrong ?

     

    #64267

    To check values for days, simply run this strategy and take note of what GRAPH reports (the last 3 lines are useless, they do nothing but ate least one Buy is required by PRT):

     

    #64300

    Thanks Roberto ( as always! ) seems Sunday is 0 and Friday is 5 and this aligns with the PRT Notes

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

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