Impossible is nothing … ?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #11541 quote
    Somatolysis
    Participant
    Junior

    Hi ProRealCode-community,

    i´m an enthusiastic prt-user and run about 10 to 15 profitable strategies live with my IG-account. I have market experience of about 15 years.

    Today I want to show the difference between backtest and live results with this example.

    Of course the strategy described in this post is not profitable in real trading.

    The reason is that in case of tight stop and take profit values both prices can be triggered within one candle.

    The prt-backtest doesn´t know what was first. It will always take the limit. The live system (IG for example) unfortunately not.

    Just to be aware of this fact…

    Regards,

    Somatolysis

    … and here is the code …

    Feel free to comment.

    Happy trading.

    defparam preloadbars=5000
    defparam cumulateorders=false
    
    //long entry
    if not longonmarket and close>average[200] and time=090000 then
    buy at market
    endif
    
    //long exit
    if longonmarket and time=100000 then
    sell at market
    endif
    
    //short entry
    if not shortonmarket and close<average[200] and time=090000 then
    sellshort at market
    endif
    
    //short exit
    if shortonmarket and time=100000 then
    exitshort at market
    endif
    
    //exit
    set stop %loss 0.1
    
    set target %profit 0.1
    

    tightlimitstop-14709117898p4cl1.jpg tightlimitstop-14709117898p4cl1.jpg
    #11557 quote
    absent1980
    Participant
    Average
    Such a smooth equity curve is always suspicious.
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Impossible is nothing … ?


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by absent1980
9 years, 6 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 08/11/2016
Status: Active
Attachments: No files
Logo Logo
Loading...