coding % of time the price reacts to pivot levels in Forex

Forums ProRealTime English forum ProScreener support coding % of time the price reacts to pivot levels in Forex

Viewing 7 posts - 1 through 7 (of 7 total)
  • #225858

    Hi all,

    I am looking for some help with coding this for PRT charts as I need to backtest something. It is a fairly simple analysis, just want to see the % of time the price reacts to pivot levels in Forex and by how much.

    Chart set-up:

    • Forex pairs major and minor
    • Daily, Weekly and Monthly Pivots (Main pivot, S1,S2,S3, R1,R2,R3) Just these levels for all three.

    I want to check the following on selected pairs:

    • Within a given period, how many times did the price bounce off the daily, weekly or monthly pivot (within 2-3 pips of the pivot considering the spread)
    • Stop loss would be between 7-20 pips (I need to able to test different variables here)
    • Take profit R:R 1:2, 1:3 etc

    I do not know coding, I am assuming more specifics may be required. Just wanted to give a brief info, not sure if this kind of backtesting is even possible on PRT.

    Thanks in advance to anyone who responds.

    Happy New Year to all!

    Mike

     

     

    #226224

    Happy New Year Mike, do you need a screener or a strategy?

     

    #226256

    Hi

    Thank you. I want to backtest this, so I am guessing that would be a strategy. Since pivots have an exact calculation, I wanted to test several pairs to find out which one reacts to them the most etc. Does that make sense? And since I have no idea how to code, this is like rocket science to me.

    I am sure it would be possible to do this?

     

    #226948

    Hi kadziak, I already started coding it, but I need some more time to finish it 🙂

     

    1 user thanked author for this post.
    #226975

    Thank you so much, very kind of you

    #228473

    I just finished the MONTHLY test. It took quite a long time to code it in my spare time!

    Adding the DAILY and WEEKLY tests will not be as time consuming as the MONTHLY-only version, as it will be a simple copy & paste with some minor editing, but I first want to know your feedback before going ahead, just to avoid wasting time in case the code does not meet your criteria.

    I am posting this very first code, which is almost 300 lines, but next times, after finishing it, I will only attach the ITF file, as it will grow well over 500 hundreds lines, making the code and the post very tough to read:

    the attached pic shows how data will be plotted in the variable panel of the backtest.

    Lines 2-16 are self-explanatory.

    Line 273 (the BUY line) serves no purpose other than abiding by the requirement of ProBackTest.

    As to GRAPH, I fear the dubugging lines exceed the limit of ProBackTest, so I suggest to first monitor the LONG performance only by commenting out the SHORT lines, then reverting the comments to test the SHORT performance.

     

    1 user thanked author for this post.
    #231685

    Hi Roberto,

    Thank you so much for this, I really appreciate it. I see the date you sent this message was in Feb, for whatever reason I did not receive a message from the portal notifying me of your response. So, apologies for my late reply. I just got a message yesterday with the ITF file.

    Once again, thank you very much for the work you put into this. I hope this will work.

    Best regards

    Mike

    1 user thanked author for this post.
Viewing 7 posts - 1 through 7 (of 7 total)

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