Wanted help to backtesting indicator type Larry Williams

Forums ProRealTime English forum ProOrder support Wanted help to backtesting indicator type Larry Williams

  • This topic has 17 replies, 3 voices, and was last updated 4 years ago by avatarZigo.
Viewing 15 posts - 1 through 15 (of 18 total)
  • #130733

    I manually tested a version of the Larry Williams approach, the results where not outstanding but nevertheless I can see possibilities. The principle : entering the market, depending on the previous candle. Normally it is usted on a dayly timeframe and on forex pairs, but I have transformed it to every timeframe and every instrument. Manually it works.

    In reality I tested the indicator yesterday on a 45 min graph. The parameters didn’t seemed optimal and trerefore I tried to programme a backtest scenario but, it failed.

    Here is the indicator:

     

     

    #130734

    Thats what you get from, the indicator above

    #130737

    I show the backtest who works but give Always 0 trades.

     

     

    #130748

    Spreadsheet manually on a 45min graph.

    #130751

    As you can see, the results are not so good. But what I trying for, is if I have a trade (long or short) then the target as well as the stoploss is clear but I’m not shure about the timestop. The meaning is to consider every candle whether there is a trade or not.  And start each candle again to obtain maybe an automatic system.

    #130752

    but give Always 0 trades

    You sure it’s 0 trades and not 0 bar trades??

    Surely with conditions below the trade is going to close as soon as it opens??

    I’ll run it on my Platform early evening, but I must get out in the garden! 🙂

     

     

    #130754

    @GraHal

    #130761

    Topic moved to ProOrder forum as this is a discussion about a strategy.

    #130765

    Apart from the mistakes that GraHal pointed out you also can’t use your calculated levels as conditions on their own. You have to compare them to something such as close > targetpricelong bt this would sell at the close of a candle. I’m guessing that you want to close when the level is hit so you need to use pending orders.

    I have modified your code to use pending orders but really the code needs a few more fixes such as only buying if you are between your exit levels and making sure you have exit orders on the market when you place the entry orders etc.

     

    #130770

    Thanks,

    At stoppriceshort is not what I want.

    Because if the price  is higher then stoppriceshort I lose the difference between price and stoppriceshort, thats not what I want. (It can still be a winning trade if price is between enterprice and TP)

    If neither TP and Stopprice (long or short) is not reached before the end of the intradaybarindex.  The trade has to stop  (at close?)  of that intradaybarindex.

    #130792

    We can only guess what you want. You need to set out exactly what strategy you have in mind down to every detail if you want someone else to code it or help you fix it. For example we have no idea if you want to sell at the calculated levels or any time price closes outside of them. We also don’t know if you want the levels fixed at the time of entry or changing with every new bar after entry.

    Much more clear definitive info is needed!

    #130807

    The indicator show the conditions  to go long or short at the open of each candle. I will illustrate this with two graphics a 15 min and a 90 min. The second last candle is only used to calculate conditions for the last candle and the result is immediately printed at the opening of the last candle. The high and the low of the second last candle (High[1] and low[1]) are used to calculate those values. Fact: there is Always a last and  a second last candle which timeframe you ever take.

    The factor (f) is in both cases (both graphics) 0.2 or 20% of the range (U-L) of the second last candle.

    At the moment price touches the Green or Red line we are in the market long or short depending. If one change line 20 and 40 in the backtest we change the targetPrice, the same for the stoplossprice line 40 and 41. Beside variable f as % of the range, we can take for example f2 (instead of 1.618) as factor for TP and f3( instead of 1) for Stoploss as variables as well.

    TP and Stoploss are well defined. If  TP or stoploss are not reached, there will be a third exit and that will be the close of the last candle.

    In fact I am searching for a timestop at the candle in action (maybe the last second of that candle). Because the first second of the next candle there are new conditions.

    As conclusion in the 15 min graph we have no entry no trade, in the 90 min graph there is a gain of 38.8€.

    #130810

    Much more clear definitive info is needed!

    …and yet somehow I am more confused than I was before! 🙂

    #130894

    ?

    #131016

    Thank you all for motivating me.

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

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