Stop loss not triggered on automatic trading system

Forums ProRealTime English forum ProRealTime platform support Stop loss not triggered on automatic trading system

Viewing 15 posts - 16 through 30 (of 35 total)
  • #77920

    Fwd / Forward test is running a Strategy / System in realtime / live trading … usually on your Demo Platform with virtual money (also referred to as paper trading)?

    Yes, that’s what I’ve been doing. 🙂 I have my systems run live on my demo account with virtual money. My problem is that I can’t trust the systems. Some days I have crazy stop/limit levels that come from nowhere, some days a system is running but not triggering any orders although it should. And somedays my systems opens orders ignoring all stop/limit levels altogether.

    We’ll see if it happens today as well. 

     

    #77929

    If you want folk on here to offer reasons then you need to post your code and a few screen shots of what you consider the System is not doing correct etc?

    Also screen shots of comparison between Fwd Test and Back Test with you highlighting on the screenshot where trades are not the same etc?

    Make it easy for folk to help you?   

    1 user thanked author for this post.
    #77961

    Without looking at your code, there are not other help we can afford, sorry.

    1 user thanked author for this post.
    #78123

    Hey, here’s the code for a system I’m running on the DAX 4H timeframe.  I was thinking, can it have anything to do with the space between the lines of text? Because this is exactly how the code is written in PRT. It does look a bit messy maybe.

     

    #78124

    Hey, here’s the code for a system I’m running on the DAX 4H timeframe. I was thinking, can it have anything to do with the space between the lines of text? Because this is exactly how the code is written in PRT. It does look a bit messy maybe.

    Hmm, when posting my reply the code was cleaned up from the line breaks. But I guess that shouldn’t matter too much anyway.

     

    #78125

    I edited it so that NOW it is exactly how it shold look in PRT.

    As for blank lines you can add/remove them as you like.

    1 user thanked author for this post.
    #78126

    Line 7 should read

    and line 5 should be included within IF … ENDIF, just before line 8.

     

     

    1 user thanked author for this post.
    #78145

    Line 7 should read

    and line 5 should be included within IF … ENDIF, just before line 8.

    Thanks a lot. I also noticed this trailing stop is automatically set to trail in 5 pip steps, although I don’t seem to have defined that anywhere in the code. Maybe that has to do with the broker?

    #78150

    At line 24 you set a TRAILING STOP.

    1 user thanked author for this post.
    #78222

    At line 24 you set a TRAILING STOP.

    Yeah I know. What I meant was that even though my trailing stop is 20, the steps are 5 pips, not 20 pips.

    Anyway, right now I should have an open position running on my 4H system but no order has been triggered. No canceled or rejected orders either.
    The code is the same as above, the only difference is the timeframe:

    Defparam FlatBefore = 085500
    Defparam FlatAfter = 130000

    My system should have opened a long position at 09:00. If I do a backtest tomorrow it will probably show a trade taken on Aug 15, 09:00. We’ll see.

    #78224

    I’m running on the DAX 4H timeframe.

    If so then:

    ….will never be met as there is no 085500 or 130000 candles on a 4 hour chart.

     

    1 user thanked author for this post.
    #78232

    Your line 24 orders the system to trail each 20 units of your currency (€ if your account is in Euros, or whatever it is). If you want to trail each 20 pips you should use

    As for your dsired time, do you want to enter a trade only if the 4-hour bar starting at 090000 meets your conditions?

    1 user thanked author for this post.
    #78233

    I’m running on the DAX 4H timeframe.

    If so then:

    ….will never be met as there is no 085500 or 130000 candles on a 4 hour chart.

    There is a candle starting at 130000, it’s the one after 090000.

    I am not sure whether DEFPARAM FlatBefore/After match the timing of candlesticks. I think they are system dependent, so that, no matter what TF you use, ProOrder won’t accept orders before that time and will cancel any open trade after that time. But I am not sure about that!

    #78235

    There is a candle starting at 130000, it’s the one after 090000. I am not sure whether DEFPARAM FlatBefore/After match the timing of candlesticks. I think they are system dependent, so that, no matter what TF you use, ProOrder won’t accept orders before that time and will cancel any open trade after that time. But I am not sure about that!

    You are obviously working in a different time zone to me then – but there is still no 085500 candle which means that condition will never be met. PRT can only see candles that actually exist on the chart so you will have  010000, 050000, 090000, 130000, 170000 and 210000 candles and nothing else. These are the only times you can use in any strategy used on a 4 hour chart.

    I might be wrong on this as I never use FLATBEFORE and FLATAFTER – maybe Nicolas can confirm for us how fussy these defined parameters are about the time used.

    #78237

    I’m running on the DAX 4H timeframe.

    If so then:

    ….will never be met as there is no 085500 or 130000 candles on a 4 hour chart.

    Makes sense. But, it’s been running fine for most of the time. But it’s not consistent. Have a look at my previous trades on this system.

     

Viewing 15 posts - 16 through 30 (of 35 total)

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