5-Bar Run (Help)

Viewing 6 posts - 1 through 6 (of 6 total)
  • #147182

    Hello,

    I need help to find error in the strategy bellow, the code do not enter position.

    here is strategy’s rules :

    • Wait for 5 bar down in a row
    • Confirm with RSI<10
    • Wait for doji
    • Take Profit in funtion of the entry price (50% of the downward move represented by the 5 precedents bars)

    Hourly or Daily Datas.

     

     

    #147191

    Your code could be:

    using SUMMATION is simpler and faster.

     

    #147192

    You wrote BARS DOWN, but actually your code (and mine) is counting BARS UP.

    If you want to scan bearish bars, you just need to replace “>” with “<” at line 15 with SUMMATION.

    #147197

    Thanks Roberto,

    But still doesn’t resolve the problem

     

    #147200

    Parameters are too strict, when DOJI is < 0.10 MOM is never below 10 (in my test). Try to test it with a higher value for RSIthreshold.

    In my code you will be reported COUNT as not exixting. I don’t know what you are exactly using it for, but this is your original code with the addition of my solution:

    moreover, your stop loss will never be reached because it’s a price, not a difference between prices which is what LOSS requires, on DAX it would be ove 13000 pips!, you should compute a difference, such as abs(HIGH – TradePrice(1)) or the like.

    #147203

    Perfect, i spotted the problem,

    Thanks for your great help.

    Gonna work on it and post results if they give something of interest.

Viewing 6 posts - 1 through 6 (of 6 total)

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