“Not onmarket” and restarting algos

Forums ProRealTime English forum ProOrder support “Not onmarket” and restarting algos

Viewing 7 posts - 1 through 7 (of 7 total)
  • #157009

    Hi,

    Simple one I think.

    As a noob I have not been using “onmarket” to open trades, and I noticed that when stoping my algos and restarting them(without any edits, the same ones), the same algo would open a new trade if criteria is met while the existing is still running.

     

    If I use “not onmarket” will that stop the same algo from opening a new trade if one is already open (even though now its a manual trade as I stopped and restarted  the same aglo).

     

    if not.. is there a way to do this? Reason I ask is i am considering stopping my algos on a friday and restarting with guaranteed stop protection so I can let them run Fridays and not be worried about gapping over the weekend if I want to hold the position. Then stop/restarting again on mondays.

     

    thanks!

    #157035

    Easy enough to exit the trade with an ‘or’ condition into close on fridays but reinitiating it again on monday without a new algo signal seems the more complex part

    Seems to me you need a condition that refers the the preceding bar of exit into fridays close  that if long onmarket in that bar triggers a buy on open monday , seems doable

     

     

    #157041

    When you stop a strategy trades can be either CLOSED or kept OPEN as any manual trade. There’s an option to tell the platform what to do when a strategy is stopped, no matter the reason why.

    When you restart your strategy it doesn’t know what had happened before and doesn’t know about other strategies.

    You can run two instances of the same strategy and each of them will do exactly  the same things, unaware of the other one.

     

    #157047

    Ah, rats, not as straightforward as I had hoped then…thanks for the info and will welcome any ideas – the desired outcome being enabling guaranteed stops before the weekend on my algos with as little fuss as possible. And disabling them on mondays. Interestingly the biggest gap ive seen was just in a normal days trading! But i feel like id sleep better at the weekends and a 24/5 liquid market during the week dont feel the gaps should ever get “that” crazy. Hope these arent famous last words 😬

    thanks!

    1 user thanked author for this post.
    #157055

    It could be 50/50 ish that the gap on Sunday evenings at 23:00 goes in your favour … that’s how I find it anyway.

    #157237

    If I use “not onmarket” will that stop the same algo from opening a new trade if one is already open (even though now its a manual trade as I stopped and restarted  the same aglo).

    No, this will be a mess. So the algo for the same instrument (not necessarily the same algo) will start as well, but there will be no “common position” in the two. It really will be a literal mess (to avoid).
    All what will help is kill the old one first.

    OnMarket will only check for the current algo having started/filled an order. So it will know about itself but it won’t know about other orders started via the same instrument.
    N.b.: I suppose it will be OK when the same instrument bears a different bar time (like a 1 minute chart vs a 5 minute chart). But although it may technically work, still things may end up badly because officially no two orders are allowed on the same instrument anyway.

    Disclaimer : With IG you will be able to manually tweak this so for example you can have a Short and a Long at the same time. Still this is not official and it may yurn bad on you. With Autotrading this seems to work as well but without control. So avoid.
    With IBKR this is not possible at all (that I could find).

     

    Monobrow, your question is very legit. For example, what about your currently running system on Forex right now (before opening), you providing a new system made this weekend, and you can’t even cancel the old one, but you can initiate the new one. I suppose this will end up fine … or not when you think you can’t cancel the old one and thus omit that.
    It is all about knowing how to deal with this properly.

    See attachment. Just your situation I think.

    1 user thanked author for this post.
    #157302

    Thanks Peter,

    I guess the only way around it is to stop/restart the systems as close to the weekend as possible with guaranteed stops when the systems are not running. Maybe in the future we will be able to place guaranteed stops in the code? Then its an easy fix i think.

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

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