Algo not exiting trade on sell signal

Forums ProRealTime English forum ProOrder support Algo not exiting trade on sell signal

Viewing 13 posts - 1 through 13 (of 13 total)
  • #151100

    Hello folks,

    Here’s my code:

    As you can see, one of the sell rules is:

    However, once these conditions where satisfied last night, the algo did not exit my trade. What am I missing?

    I’ve looked over my code five times and I’m starting to think I’m going crazy. I’d appreciate any help.

    Thanks,

    Aleks

     

    #151106

    In your chart I can’t see where it was supposed to exit.

    Append

    then, after backtesting, check the variables’window to see what value they retain candle by candle. If their value is not, then conditions are not met.

     

     

    #151112

    Hi Robert, thanks for your answer. After including the graph commands, here’s what I get:

     

    As you can see, the parabolic SAR gives off a sell signal, however, the system stays long.

    #151114

    Your pic shows that on the bar where your mouse is sitting there were no trades open!

    #151167

    Hi Roberto,

    The blue bars bellow the graphed variables show that a position of 0.66 lots was open.

    Thanks,

    Aleks

    #151168

    Does the SAR on your Price Chart have same settings as the SAR in your Algo at Line 23 – (SAR[0.3,0.1,0.1] )

     

    #151169

    Yep, I checked for that and it seems like both the SAR on the chart and the system are the same.

    #151170

    So you must have changed the SAR on the Price Chart because the default settings are – SAR[0.02,0.02,0.2]

    Odd you say … ‘seems they are the same’ … either they are the same or they are not the same? 🙂

    #151171

    Anyway your condition c5 = (indicator4 > close) occurs on the bar marked with the red arrows on attached and so the Sell will occur at the open of the next bar … as indeed it does??

    Or maybe you just haven’t shown any more bars??

    Forgive my brusque comment in my previous post … I have one eye on the tv and I’ve had a beer! 🙂

    #151174

    The GRAPH shows that C5 was true at the close of the second to last bar so the trade should be closed at the open of the last bar shown on the chart. I think we will not see the true backtest actions until this latest bar is actually closed and the backtest engine can see what trading actions would have occurred in that last bar. It is a back test and not live trading and actions are not real time.

    I’ve not been back testing for a while so might be a bit rusty and talking rubbish though!

    1 user thanked author for this post.
    #151175

    Hi GraHal,

    Thanks for your answer. All good- personally I’m nursing quite a hard hangover from yesterday, so my English might not be as clear as I’d like it to be. I apologise for any miscommunication.

     

    In my last screenshot, my cursor hides the first red dot that appeared on the 19th of November. The trade should’ve been closed on the opening of the 20th of November.

     

    I thought I might also add that this system was actually live while these trades where on, and I thought that the system would’ve exited me out of my trade in real time?

     

    Thanks,

    Aleks

    1 user thanked author for this post.
    #151178

    Try using this as line 30:

    it’s the same as the original one but… never say never!

     

     

    #151179

    You can’t use the GRAPH instruction in live trading. Are you sure that you mean live and not just a currently running backtest?

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

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