intraday DAX strategy 5min mini1€ spread 1

Forums ProRealTime English forum ProOrder support intraday DAX strategy 5min mini1€ spread 1

Viewing 15 posts - 391 through 405 (of 503 total)
  • #23635

    In 1 second graphics, I want the 9.00h to place the purchase or sale order and keep that order open for the next 5 minutes.

    #23637

    That would be coded this way:

     

    #23638

    @ Raul, Can you rewrite the code for 1 second or something like 30seconds or 1 min chart? I tried the backtest and real results for recent 1 week, my backtest show a gain of £196 when my real Live trade lost of £304. a big different when i see the trailing stop 5 still work ok.

    #23645

    Hi All – I have tested the trailing code function that Nicolas suggested and volpiemanuele also tested earlier in #23493 with the following conclusions – Note that we are comparing the original Dax-5-min-v2 strategy with a 5 point trailing stop (labelled v3 in my screenshots below and left pic)  with the same strategy using Nicolas trailing stop code (5pt trailing start, 5pt trailing step and 5pt stop loss) – labelled v3.2 in my screenshots and is right pic. Please also note that the actual p&l numbers and differences in stats between the two versions are less relevant here as we are purely testing functionality for this purpose.

    1) The results for the coded trailing stop (3.2) are actually not that bad, the drawdown amount and % is quite large so there needs to be some tweaking and testing done but there is some promise.

    2) Revised 3.2 produces more realistic results eg. the average time in positions seems correct eg 44s in losing positions vs 0s shown in v3 which is clearly incorrect

    3) In the orders list you can see that both versions produce almost identical entry points but vastly different exit prices – suggesting indeed a problem with the way the trailing stop works in original v3 and confirming all our thoughts from earlier.

    4) In the closed positions list – with the original v3 embedded PRT trailing stop code the difference between MFE (max favourable execution) and MAE (max adverse execution) ALWAYS EQUALS THE Abs performance (ie P&L) but in the revised coded version 3.2 there is usually a difference suggesting that the trailing function is working properly. This is how it should be as in real trading since a position will never always go straight to the stop loss or take profit limit, as we all know as markets constantly move up/down and never in a straight line. This gives me confidence that Nicolas’s trailing stop code indeed seems correct and is working like it should, it’s the inbuilt trailing stop function in PRT which is incorrectly executed.

    Based on the above I would not trust results using the PRT trailing stop function but if you need that ability in any of your strategies please use the written code provided above earlier. Also, I feel that the original strategy Raul has suggested when he started this thread is still worth pursuing based on the revised results but with amended coding and backtesting now we are aware of the issues and limitations. I notice that it has been suggested to use 1sec timeframe which seems like something worth looking into and a step in the right direction. It’s a process, we need to be patient.

    3 users thanked author for this post.
    #23651

    Attached is the equity curve of the two.

    #23670

    Hi nicolas, I have managed to do something, to see what you think, I note that the trailing attached is what it does is close the 5 profit points. I attach the catch made on purpose at that time so you can see that it keeps going up without going back but the operation closes to 5 points.

     

     

    1 user thanked author for this post.
    #23673

    And I do not understand why he gets 500 contracts

    #23675

    Definitely, pro real time does not do well backtest, regardless of whether you use trailing or normal stop. Attached image 1, program with normal stop 5 and take 10. left what happened in real, right backtest. We see that opens exactly to the same level: 11627.3, in real loses, in the backtest of the winner.

    Image 2, what happens tick by tick, we see that we lose because first the price falls and then rises.

    2 users thanked author for this post.
    #23678

    image 2

    #23686

    @Raul

    You are accumulating contracts because you are adding 1 order at each bar (cumulateorders=true) and your trading condition is still true between the schedules.

    #23689

    @Raul, so what is the best code I should put in the real Live test for next week? Please attach full .itf file here, i will put it on Live trade next week for continue testing. But, consider I dont want to wipe out all my capital yet! Thank you Raul.

    #23691

    @Lyny we need to give them time to work it all out, it is not finalised yet. Best you QUIT your ATS from Live trading then you can sleep at night? 🙂

    #23692

    Effectively, I recommend to stop using the live trade because the backtest does not do them well nor using a normal stop. Would have to try in demo for a while and compare with the backtest to know how much it fails.

    #23697

    Oh dear, I have to agree, Raul I’ve just looked at another one of your earlier strategies in my live results from today to check and come across exactly the same problem you highlighted above. The strategy uses 10pt take profit and 5 point stop loss (ie no trailing). As you can see from the screenshot, the backtest ignores the stop loss completely and returns the 10pt take profit. In reality in the live graph as you can see the 5pt stop loss is triggered – as it correctly should be as the market went through that level.

    My logical conclusion from this – I don’t think its the stop loss or take profit function that doesn’t work – if it was then it would affect pretty much every strategy here. It’s the tick by tick backtest function that definitely does not work properly (it’s essentially back to same “zero bar” problem we had before v 10.3) or if it does, it’s intermittent so best not to rely on it until PRT finds the cause and fixes it. This does not look good unfortunately I must say.

    P.S – I have the tick by tick box turned on and re-run the backtest a few times just to make sure that there are no fake results.

    Edit – I have just tested the strategy with the tick by tick turned off and it provides the same results for today as above (which is obviously wrong) so it’s definitely a problem with the tick by tick module ie its basically being ignored. But not all the results are the same so it’s being used for some trades but not others which is even more strange…..

    #23700

    I echo Grahal and Raul’s sentiments above, please don’t risk capital you cannot afford. Best to stand aside until the issues are resolved.

Viewing 15 posts - 391 through 405 (of 503 total)

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