Stop order functioning in codes versus limits

Forums ProRealTime English forum ProOrder support Stop order functioning in codes versus limits

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

    Hi guys n gals

    A quick question around stop orders in the code and when executed. so on the selected pic attached I graphed in the area of the order for 1:1 whether used as a limit or stop order.

    In backtesting the limit works fine takes out the desired profit, on stop orders it also takes out the orders howeve in some circumstances it doesn’t when the price rallies, however backtesting on Dax here I’m seeing it extend around 10 pips above and come back 5 pips below which even with spread should stop out and take partial profits but it doesnt. This is 08:45 a.m and looking onthe platform minimum stop is 5.

    So my questionis do stop orders have to come past the minimum order distance when set as a stop?

    Why do we think this isn’t stopping out?

    In the meantime I’ll likely just code in a sell at market for 50% off instead of sitting orders but an explanation of the Stop order not stopping out in that picture be appreciated.

    Thanks in advance.

    #163623

    Ok so the spread was 1.2 and when setting to 2pips it does stop out – so I may not understand something as my logic sugests it should stop out on that chart at some point as it passes and comes back down but allows the trade to continue without amount being reduced with 1.2 pips…

    #163624

    Are you sure the pending order was set and at the correct price? Did you graph its level on the chart?

    #163642

    Yes, the line you see is where the order is taken for limit orders and the stop order where spread is set to 2. to be clear it executes the stop order at 2 pips spread and not at 1.2 pips spread.. not sure why…. the order actually executes at the start of the line and the line and is “graphonprice pipslim” which is where pipslim is >= the 1:1 in pips the order level whichremains unable to re-execute a second time around.

    I just had a crash on the platform and it didnt save but without re-testing believe that was the code.

    Works for 2 pip spread backtest but not for 1.2 pips but I think based on the 1 second chart price action it shouldn’t matter in relation to those spread differences so a query on what it’s doing really.

    It is a backtest

     

    #163645

    I’ll try the below code and see if it has the same anomaly

     

     

    #163646

    might have to add direction there methinks

    #163652

    My simplest solution

    Broker orders… pwfff!

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