Close operation and open a new operation.

Forums ProRealTime English forum ProOrder support Close operation and open a new operation.

Viewing 6 posts - 16 through 21 (of 21 total)
  • #166134

    Of course “set stop loss” can always be moved, but not beyond the original positionprice. To do that, you’d have to use “sell at xx stop” orders (or exitshort). Then you can set a new stop loss at almost any price, but not lower than the original stop loss defined by “set stop loss” which remains active as a threshold for the whole duration of a position.

    #166135

    That ‘sell at’ only executes at bar close right?

    My point is once a trade is started with Set stoploss, it sends the order to IG and it becomes an IG stoploss. Once onmarket you cant change the IG stoploss but can only send an exit order through your code. Which only sends it on a bar close.

    Now I could be completely wrong here so please correct me if I am.

     

    #166136

    Supposed, we open a long position @ 15000 and set the initial IG stop loss to 14800 by “set stop ploss 200”. Then, “sell at 14900 stop” in a following bar will change the IG stop to 14900, but remains active for only one bar. Thereafter, “sell at 14900 stop” has to be renewed or the original “set stop ploss 200” becomes active again.

    However, when the original IG stop loss is at 14950 (for example : position entry  @ 15000, set stop ploss 50), you can’t go lower than 14950 with a “sell at xx stop” command, because “set stop ploss” defines the maximum stop distance.

    To go lower than 14950 in this case, you’d have to code once again “set stop loss 100”, and this will change the new IG stop to 14900.

    Supposed the price has risen to 15100 in the meantime, you can’t use “set stop ploss” to change the IG stop loss to 15050, because this is above the positionprice of 15000 (negative arguments for “set stop loss” are not allowed). To set the IG stop loss to 15050, you’d have to use “sell at 15050 stop” instead.

     

    Studying the handbook may well be useful and can save quite some coding time !

    #166138

    I think youve missunderstood what I was trying to say. Im not talking about changing the stoploss below the set stoploss, but execution speed.

    My main point is that ‘set stoploss’ is an IG stoploss that is executed tick speed. Sell at or exitshort is executed on bar close.

    Using your example, ‘sell at 14900 stop’, in a 1 hour TF algo if the price is at 15000 at 2pm bar close then next bar at 3pm closes at 14850, does the algo sell at 14900 or 14850?

    Thats my question. If it was ‘set stoploss’ it would sell at 14900. From my understanding ‘sell or exitshort stop’ dosent.

    One way to mitigate this is ofcourse using MTF.

    #166139

    My main point is that ‘set stoploss’ is an IG stoploss that is executed tick speed. Sell at or exitshort is executed on bar close.

    Using your example, ‘sell at 14900 stop’, in a 1 hour TF algo if the price is at 15000 at 2pm bar close then next bar at 3pm closes at 14850, does the algo sell at 14900 or 14850?

    Thats my question. If it was ‘set stoploss’ it would sell at 14900. From my understanding ‘sell or exitshort stop’ dosent.

    One way to mitigate this is ofcourse using MTF.

    “sell at 14900 stop” is an ordinary IG stop loss that is executed at tick speed. It is a true IG stop loss.

    “sell at 14900 stop” will sell at exactly 14900 (+- slippage).

    Only “sell at market” is executed at bar close.

    If you don’t believe it, try it out on demo ! This is what the demo platform is for, not for trying out useless strategies !

    I’d dearly recommend to study the basics of the PRT language before thinking about such oddities as MTF !

     

    #166162

    Yes you’re right. After testing,  ‘sell at ..stop’ works as intended.

    I think my confusion came from mixing up the conditions or indicators required to activate the stoploss. Which indeed only calculates at the end of the bar.

     

Viewing 6 posts - 16 through 21 (of 21 total)

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