Stoploss trigger value set to a minus value what is it doing?

Forums ProRealTime English forum ProOrder support Stoploss trigger value set to a minus value what is it doing?

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

    Hi

    Stoploss trigger value set to a minus value what is it doing?

    I’m currently running and testing this. Using normal values it works as it should, and works particularly well for a eurusd strategy I wrote with different normal integers. However when I put in a negative integer for the stop trigger to move th estop loss I get interesting results but I am unable to ascertain why via graphing.

    This is on GBPUSD 7hrs and I’ve put below code to enter on next candle for testing purposes of the stoploss move.

    Graphing and graphonprice show this on the 7hr as opening on the new stoploss level of 43, however the backtesting results show significant improvement of stopouts without losing good trades and provide different results entirely to just using a stoploss of 43 by quite a lot, 250pips or so over 16 months.

     

    I’m currently testing this out and have tested on the 1 minute and 5 minutes as well as 10 minutes which show results of moving based on time and on the next bar for 5 or 10 mins or if I recal it was 1 minute on the 5 minute chart with a lesser negative value (memory fails me a bit there), so it can also vary if you change the value to a lower negative value like -10 or -20 say.

    I’ve got this up on the 7hr GBPUSD testing to see what it does and screen recording it currently so  I can flick through and see at what point it changes and then try to figure out why. I might be missing something obvious but the stoplevel graph reflects the graphonprice levels which is what I would be expecting.

    I’ve left it run on the demo 7hr now for over 1 hour and its retained its stoploss of 60pips for the first hour of running and not changed to the new stoploss, so I’m thinking it’s time related somehow otherwise I would have a graph showing 60 dropping to 43 on the next bar if it closed at or past a particular level, which isnt reflected in the graphing. Might take me a few days of recording if I get stopped out and have to await the next candle, in which case I’ll try a stupid initial stoploss and take profit…

    Just to note the only change from this working normally is I set the trigger to a negative value of -32 that is “newstoptrigger= -32” in the code

    Hopefully someone knows what is happening and I dont have to record for days on end. 🙂

    Pic of graph and graphonprice attached as well

     

    #136005

    Looking at my notes there I’m not sure they are current.. best to read the code..- sorry about that,, above code totally wrong one.

    Below is current code with the results shown

     

    #136133

    Well seems like a non starter for solutions, however running it seems to set the new stop at next bar open, so starts with the intial stoploss and moves to new stoploss at next bar. Doesnt explain the programming of it mind or why a lesser value doesnt wait for the next bar. Next bar stoploss move actually gives me better profit on the timeframe used with this strategy, I think because it allows a bit of a foat (7hrs timeframe) so allows additional catches. So I’ll need to code for stoploss at the second bar of trade and see if it produces the same result…  now have to work on that unless anyones got a few lines of code of coure… 🙂

    #136136

    I suggest that you also GRPAH all other variables and expressions that may affect results:

    • GRAPH TradePrice
    • GRAPH tradepricenewstoplevel
    • GRAPH Mystoplevel-tradeprice
    • GRAPH close – TradePrice
    • GRAPH TradePrice – close

    to easily spot any wrong value.

    You might use ABS() to make a negative vlue positive, but that would leave the glitch hidden.

    #136175

    Ok cheers..

    #136199

    Philstrading – there is no need to quote Roberto when he is the only person who has replied to your topic! Unnecessary quoting bloats topics and makes them hard to read for others. Please read the forum rules regarding quoting before using the quote button again. I have deleted your unnecessary quote.

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