Closing operations Friday night at 22:00h

Forums ProRealTime English forum ProOrder support Closing operations Friday night at 22:00h

Viewing 6 posts - 1 through 6 (of 6 total)
  • #42862

    Dear all,

    I have coded the closing of my operations in my system on Friday night at 22:00h to avoid having open position during weekends and expose those positions to weekends gaps and charges from the broker.

    I have opted for the command QUIT, but I am not sure if that will stop the system or just will close the operation until Monday at 00:00h

    I am including the code and would appreciate any comments or even suggestions or alternative options.

    Thanks so much.

    Juan

     

    #42947

    Hi,

    I am answering myself, :))

    I think that:

    IF Dayofweek = 5 THEN

    DEFPARAM Flatafter = 220000

    ENDIF

     

    #42948

    Hi,

    It doesn’t work. DEFPARAM can’t be used like that.

    Any suggestions???

    (Reminder: I want to close the operations on Friday night at 220000, but I want the system to run from Monday to Friday without interruption)

    Thanks in advance,

    Juan

     

    #42949

    Try this one (I did not):

    You close any trade, either LONG or SHORT at the time you want, on the day you want to.

    You can’t use DEFPARAM in conditional statements, it’s an unchangeable directive to ProOrder, not an instruction.

     

    #42951

    Hi Roberto,

    Gracie mille. I will try it right now and will let you know the results.

    Juan

    #42954

    Hi Roberto,

    It works. I have also added something to avoid launch any operation after 22:0000 on Friday.

    Oil Market close at around 23:00, and reopens after 00:00 everyday. At least at this hour there is a gap or inactivity everyday, but sometimes close before. In some cases I have noticed that cease all the trading around 220000, so just to be safe I have decided to set up closing operations on Friday at 22:00.

    After that I noticed in the backtest that the system bought at 22:45 on Friday in two occasions, causing in one of them a gap of 243 points until Monday. So to avoid any involuntary buying or selling after 22:00 I have included the Fridaynight (doesn’t sound very professional, but it works 😉

    Thanks again,

    Juan

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

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