Fibonacci retrace backtest for PRT – collaboration project

Forums ProRealTime English forum ProOrder support Fibonacci retrace backtest for PRT – collaboration project

Viewing 15 posts - 1 through 15 (of 56 total)
  • #17015
    Maz

    Please come forward here if you would like to collaborate on a Fibonacci based retracement backtest for PRT.

    ps: Was thinking to set up a private GitHub. Anyone interested to join?

    #17030

    I use Fibonacci based retracement loads when manual trading.

    Re collaborate … are you seeking ‘accomplshed coders’?

    What is a private GitHub??

    Cheers

    GraHal

    #17031

    I can help, but better to discuss and code on forum for everyone’s interest.

    #17050

    I read the Wiki on GitHub so no need to explain now.

    Yes I agree with Nicolas if it can be kept on here then so much the better.  If, from the outset, we can agree a version control protocol then it would prevent confusion when folks include amended code snippets only in messages.  

    #17056
    Maz

    Thanks for the responses.

    I suggested a private github for version control purposes (as it does this very well) rather than dumping code into forum posts. By private I mean that only members from this site can see the project. I suggest posting links to github versions instead just publish the milestone releases that actually work here on the forum. If there are better suggestions then I’m open to ideas.

    Perhaps a Skype group for collaborators would work. Being an accomplished coder is not all that’s required for a collaboration – coding is the easy part. I propose that collaborators take a specific interest in one or more research bases such as execution strategy (entry and exit criteria), quantitative analysis (mathematics, probability, asset-specific tweaking, seasonality etc), risk analysis/ money management and more. About me – I posses a background both in software and in fund management; A collaborative effort here might be both fun and cultivate some good ideas.

    Food for thought:
    In addition to a simple fib indicator there will most likely need to be an implementation of an “intelligent” key level detection algorithm as well as an oblique (diagonal) trendline support and resistance algorithm (neither of which are any good in PRT). It would also need to be pivot-aware using one or more of the pivot functions.

    Ideally the core system should be resolution independent (“works” on most temporal or non-temporal candles) as well as market independent. The idea is to build a back-test modeled on trader psychology (chaos theory etc) rather than a market-specific idiosyncratic behavior. I believe that Fib, key levels, tends and pivots might be a good place to start.

    Best, M

     

    #17063

    Price fluctuation is made by traders’ psychology. Sometimes we all forget that what make price move much higher or lower is only the result of the traders herd behaviour 🙂

    I agree with you about importance of key levels and any other support / resistance ones and defining a solid algorithm to detect them would be a very consistent code snippet that could be part of any other project.

    About pushing codes into github, I understand the importance that this kind of tool is for coder like ourselves (I used to use it too..), the choice is yours. About me, I’m already involved in many professional and personal projects around the website and this will be the center of my universe for the future months/years (hope so), that’s why I prefer to have everything in place here, for any future references for me and for the community I’m trying to rise around the PRT programming language and trading in general.

    Apart from these organizational problems, what do you have in mind when making decisions to launch orders at the market?

    #17092
    Maz

    https://github.com/publicprtcode – For work-in-progress

    “what do you have in mind when making decisions to launch orders at the market?”
    Multiple criteria. R:R will be based on fib. Hit-rate based on various other filters. There will be two versions, long and short. This is because most markets exhibit different rise and drop behaviors.  A single code base should not fire both long and short orders.

    #17099

    I really like this kind of topic 🙂

    1. What about time horizons?
    2. How do you determine Fibonacci retracement levels? How are the 0 and 100% levels calculated?

     

    #17101

    GitHub looks good, thanks for bringing it to my / our attention.

    There should not be a problem as everybody from here can accessGitHub. I guess discussion will be on here with links out to latest version code + comments re changes etc.

    #17156
    Maz
    1. What about time horizons?
      – not yet too important, let’s start with temporal: 30 minute candle and go from there.
    2. How do you determine Fibonacci retracement levels? How are the 0 and 100% levels calculated?
      Please see attached image of a potential long setup.

    Idea for long setup fib 0 and 100 points:
    – Define minimum valid drop range (say 150 basis points or no trade) (in future this will change dynamically according to market conditions)
    – Top defined as highest high above last PA move above MA[20] (again MA period to be dynamically adjusted in future)
    – Bottom must be below MA
    – Bottom must be x% extension below previous support
    – Bottom possibly defined after first RSI-oversold signal returns > 30; AND/OR defined by hammer; or defined by close > previous close

    If this  condition exists then fib levels created from low to high and we look for entry signal. In the “real world” we will look for the entry signal on various lower time-frames but as PRT won’t give this ability we can make some generalizations based on hit rate and probability analysis.

    Stop would be dynamic based on market conditions signaling negation of low and beyond a threshold where probability of reversal or break even is reduced.

    1 user thanked author for this post.
    #17166

    I’m getting excited! I need to digest / read over above a few times, but it contains a lot of what I look for in a manual trade. Not being an accomplished coder, I’d given up on a bot that copies my manual trades (but I do run 100 bots in Demo),

    I feel this Project has the potential to deliver a bot that makes money. The GitHub is a welcome addition to widen our skills and experience.

    It be good if the experienced coders & traders off here could assist with ongoing development. I’ll try a gentle … hey have you seen this … where appropriate in relevant Forum discussions?

    GraHal

    #17211
    Maz

    Please see attached first draft of an automatic fib retracement indicator. Will upload the source (0.01 alpha) to github if anyone wants to fork to improve it let me know.

    Quick question: Anyone know how to RETURN plot lines just when there is useful values above 0? The graph plots the zero value while there is no output and then jumps to the fib levels and then line drops back to zero after the setup is negated. I just want to draw the box.

    Regards,

    M

     

     

    1 user thanked author for this post.
    #17237

    Because I’m on smartphone now I can’t help much now. About boxes, you can’t draw them with 10.2 sorry. To avoid lines back to 0,set your returned variables to points draw style. Of course you can upload the code to github or maybe I can add latest files on first post when they are updated too..

    Your trades examples on your shared screenshots are relevant, I’ll have a look later, time to rest for me 😊,  thanks for sharing.

     

    #17291
    Maz

    Here’s my code. Note dependency on “RSI Pop” file
    https://github.com/publicprtcode/Indicators/tree/master/autofib

    Currently this won’t find all possible setups but the most obvious ones. Try on any market. Developed on 30m but possible to run on any temporal view. Not yet looked at non-temporal views.

     

    #17308

    Hi Maz

    I’m sure you left it in to test us (ha) but I’ve sent a Pull Request as below.

    If you can’t see it then maybe I need to complete a final stage on Git?

    Thanks
    GraHal (TraderGra on GitHub (GraHal was gone!)

Viewing 15 posts - 1 through 15 (of 56 total)

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