Magical Trend strategy question

Forums ProRealTime English forum ProOrder support Magical Trend strategy question

Viewing 13 posts - 1 through 13 (of 13 total)
  • #216925

    Hi Nicolas,

    Although the discussion was in the French community, I have to continue here as I cannot  write in French

    I really like your magical trend, but I’m puzzled with the number of trades its making when I use your strategy with the trailing stop.

    You will find it at the end.

    I made the walk forward testing and it gives very good results in the 15 minutes and 30 minutes timeframes with a trailing stop of 5 pips.

    However the number of trades in the IG version of Prorealtime, it is very high and very costly due to the spread.

    Is it an IG issue making a real trade every time when the stop is changed, or is it a matter of coding?

    Thanks for your help

    Martin Bakelaar

     

    #216926

    A “ptrailing 5” in a 15 minute time frame definitely doesn’t work and just embellishes the backtest.

    1 user thanked author for this post.
    #218625

    I’m  using  the above Magical Trend strategy in the 1 hour timeframe with a trailing stop of 8 pips and it gives good results.

    In an hour a lot can change and the Magical Trend strategy is lagging, therefore I want to add the signals of the MACD in the 15 min timeframe.

    Buy when Close > “Magical Trend” in 1 hour TF and MACD – MACD Signal Line > 0 in 15 min TF

    Sell when Close < “Magical Trend” in 1 hour TF and MACD – MACD Signal Line < 0 in 15 min TF

    Would someone be willing to help me to add the right programming of the MACD in the 15 min TF, to my strategy.

    Thanks in advance

    #218721

    Here is the strategy code modified to add the MACD zero line cross to trigger the order:  (not tested)

    1 user thanked author for this post.
    #218726

    Thanks for your great help Nicolas, I will test it and come back to you.

    #218751

    Dear Nicolas,

    The strategy is working in the 15 minute time frame, but not in the 1 hour time frame as I was hoping for.

    Maybe I expressed myself wrong, or I’m doing something wrong..

    I’m using the Magical Trend Strategy in the 1 hour time frame as default with Pro Order auto trading

    At the start of each hourly bar, the Magical Trend Strategy is buying or selling depending on the trend.

    At the the start of each new hourly bar the Magical Trend Strategy should have an extra condition

    This extra condition is (MACD – MACD Signal line) in the 15 min time frame

    When Magical Trend in the 1 hour time frame and (MACD – MACD Signal line) in the 15 min time frame are in line, a position should be taken

    In other words, when Magical Trend is positive in the 1 hour time frame, but (MACD- MACD Signal) is negative (<0) in the 15 min Time Frame, no new long position should be taken.

    Hope you can explain it to me

    Thanks Nicolas

    #218816

    Sorry my bad, change line 16 with:

    Orders will trigger on MACD cross of the default timeframe (the one you are lauching the strategy on) with line 0, otherwise if you are just testing if >0 and <0, you’ll get plenty of orders because that conditions will be fulfilled for a long period of time.

    But, it could be changed of course..!

    #218872

    Dear Nicolas, thanks for your help again.

    Unfortunately it is not working what I have in mind.

    Let me try again:

    I trade in the 1 hour TF, but want to test on >0 and <0 in the 15 min TF, but only at the close/open of  the 1 hour bar

    When your magical trend in the 1 hour TF makes a buy order at the close/open of the 1 hour bar, but the MACD in 15 TF is <0 on the top of the hour, the buy order should not take place.

    In this case you should have less orders

    I hope my explanation is more clear, but I’m not sure whether this is possible.

    Thanks again Nicolas

     

    #218889

    In lines 27 and 32 you can add this condition:

    #218902

    Thanks Roberto, I will test later today

    #218919

    Dear Robert, Nicolas, thank you both for the help given, its working like I had in mind.

    There is only a minor issue, the strategy is taking the position not at the start of the 1 hour bar, but 15 min after

    Is this something that can be adjusted?

    Thanks again.

    Martin

     

    #218929

    It’s because the order is placed when the 00-minute candle closes, therefore the entry is at minute 15.

    You may change the line I suggested, replacing 0 with 45:

    #218931

    Thanks a lot Roberto, understand the logica now and will test with various options.

    Best regards Martin

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

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