HULL Moving Average strategy

Forums ProRealTime English forum ProOrder support HULL Moving Average strategy

Viewing 15 posts - 1 through 15 (of 16 total)
  • #138421

    Hi

    I want to use the Hull MA indicator for backtesting, but cannot see any way of coding it
    to trigger a buy or sell when the color changes.

    Advice welcome.

     

    #138426

    There you go:

     

    1 user thanked author for this post.
    #138460

    Roberto

    Thanks for the quick reply.

    Unfortunately, I cannot get it to work.

    In case I’m doing something wrong, this is what I have done.

    1. Pasted the code into a new ‘creation by programming’ box and clicked ‘ProBacktest my system’ – There were no trades/no results.
    2. Then used EURUSD with 2 Spread – No trades.
    3. Then changed the dates to 1/6/19 – 26/6/20 – No trades.
    4. Then changed the Period to 50 – Result: Only one entry in May 2020 and exit of that trade in June 20. The trades were not at colour changes but many candles away.
      No other trades were taken for the year.
    5. Shut down the platform completely and re-opened it.
    6. Pasted the code in fresh but now I can’t get it to take any trades, whatever parameters I use.

      What I want is to have it exit on a color change and immediately open in the opposite direction because of that color change, non stop.
      With a Taking Profit parameter and Stop Loss parameter.

    As a PRT newbie, have I done anything wrong to prevent it working?

    #138461

    Sorry, my fault on detecting colour change.

    Replace lines 4-9 with:

     

    1 user thanked author for this post.
    #138480

    Hi

    Still the same ( I deleted duplicate  if  on line 4 above, but still no joy).

    Could you also add the code for taking profit(target) and stop loss.

    Thanks

    #138482

    You posted in ProBuilder and I did not pay attention to what you exactly wanted.

    I moved your topic to ProOrder.

    There you go:

     

    #138484

    Thanks for that.

    Sorry about posting in the wrong place – what with PRT/ TRADING.PRT / PRT.CODE / PRT ANALYSIS / ProOrder  and ProBuilder!

    I had difficulty getting access last week until the helpful lady at Support told me about the existence of  PRT and TradingPRT and PRT Code and Green platforms and Blue platforms!
    She said it was a common query from customers until they got used to the differences.

    The code is now taking multiple entries and exit orders.

    But the entry/exit orders appear to be random.

    EG. I set Period = 200, on a 4HR chart. This gave a color change on 29 May, followed by the next one on 14 June

    Consequently,  there should have been one exit (from previous trade) and one new entry  on 29 May,
    and one exit and a new entry on 14 June.

    What actually occurred was 7 entries and 7 exits (ie. 7 complete trades) during this period, instead of just one single trade

    None of the trades was close to the color change.

    #138485

    Roberto

    HOLD EVERYTHING!

    Looks like my bad.

    during testing I pasted the code with Default Period 16, and didn’t change it back to 200.

     

    I will now have a strong cup of coffee, beat myself up and calmly test again much later tonight.

    I will then report the outcome to you.

     

    Thanks.

     

     

    #138493

    Green platforms and Blue platforms!

    Being a curious guy … I’d love to know what these Green and Blue Platforms are? 🙂

    Maybe I’ve been using PRT so long I can’t see it any more?? 🙂

    #138569

    Hi Roberto

    There is still a problem.

    To make it easier to see the problem, I set a very low Taking profit and very high Stop Loss, then ran the backtest.

    USDCHF – H4 – Period 200 – TP20 – SL 300

    Results: total 193 Trades – 180 wins(OK)   and    13 Losses(not caused by SL)

    All the high losses were caused by the trades not exiting at the color change. Instead, they all stayed open for many more bars in the next (wrong) period direction), then randomly closing.

    If you quickly run your code on a backtest you will see this, by viewing the ‘Closed Positions List’, seeing the red losses and looking at them on the chart.
    You can then see the entries have triggered but the exits didn’t, until many bars later.

    Hopefully, this will help you identify the fix.

    Thanks.

    #138570

    It does NOT exit at a colour change because there were no provisions to!

    This version will ALWAYS be on market, since it does Stop & Reverse on a colour change:

    you will change your TP & SL as best fits you.

     

    1 user thanked author for this post.
    #138571

    I got attached if it’s of any interest Period = 16, TP = 400 and SL= 100

    Spread = 4

    1 user thanked author for this post.
    #138589

    Roberto

    Just got back and tested it – Working fine.

    Thanks very much indeed.

    #138597

    GraHal

    When you go to the       ProRealtime.com         website,  it’s Blue.

    When you go to the      Trading. ProRealtime.com         website,  it’s Green.

    I had been back and forth between the two sites and hadn’t noticed it until Support pointed it out.

    #138602

    You can change the border colours in the platform settings. I used to use this feature a lot when I had three accounts so I could tell the difference between each account and demo and live for each account when I had more than one platform open at the same time. Nothing worse than thinking you just closed a demo trade for a loss and then realising it was a live trade!

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

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