MA crossing seems not to be working

Forums ProRealTime English forum ProOrder support MA crossing seems not to be working

Viewing 9 posts - 1 through 9 (of 9 total)
  • #73067

    I was backtesting one of my strategies and found out, while monitoring MA crossings, some differences between my strategy and my custom indicator, with the same settings, on DAX daily chart.

    While my indicator seems to identify crossings correctly, my strategy does not!

    I’d like someone to help me find out what’s wrong.

    This is my indicator:

    This is my strategy:

    and I attach 3 screenshots:

    • the first one shows my idicator detecting a bullish crossing on Nov. 26th 2015, while my strategy GRAPHED wrong values
    • the second one shows a my indicator detecting a bearish crossing on Dec. 11th 2015, while my strategy GRAPHED wrong values
    • the third and last one shows my indicator detecting no crossing (and it didn’t occur) on Feb. 22 2018, while my strategy GRAPHED a bearish value

    Setting MAs to 20 (faster MA)  and 100 (slower MA) did not change anything (just a few more crossings).

    Replacing MA from simple to exponential (adding “,1” within brackets of AVERAGE) didn’t change anything, as well.

    And I didn’t even drink a glass of wine before coding!

    #73072

    Have you tried graphing FASTMA and SLOWMA in the strategy to see what values you are getting?

    #73079

    It seems to work on my platform:

    Screenshot_1-5

    I’ve put two identical strategies on there – one graphing the averages and one graphing the CrossingUp and CrossingDn and also the indicator is on there.

    #73082

    Hi Roberto, assuming this is ig cfd dataflow, not futures? If yes, I don’t see the ig sunday candles on your daily graph (just a quick check made on the sunday nov 29th 2015), so I suppose you’ll have a difference in calculation of daily moving averages coming from backtest run on prt servers (adding a sunday candle to the daily chart), while your indicator on your pc seems to be customised with the classic 5 day week (no sunday candles) for probuilder…

    #73083

    It appears that your indicator is wrong because I have no crossing on that date shown.

    #73085

    I got erratic results, on a 1-hour TF differences between GRAPH and MAs on chart are small and sometimes for the FASTER MA values match.

    I also tried to change some options, Display/Don’t display WE data, but that does not change much, still erratic (but different) values.

    I also tried to set up custom trading hours (7-21 UTC+1) and default trading hours, but still there are differences.

    Also trying to set PreloaBars to 0 or 10000 did not change the outcome.

    #73086

    I’m using IG’s CFDs.

    #73087

    Clicking only the one box for applying weekend data? Or also clicking the second box just below it (apply these settings to daily and superior timeframes)?

    #73089

    It seems that the only working combination is:

    • display weekend data (box ticked)
    • do not app apply to non intraday data (box unticked)

    So I will have to comply with PRT default settings. What use are custom settings then?

    When I tick option NOT to display WE data, that data shouldn’t be considered for any calculation and prices in that period should produce a gap, which indeed IS only visually.

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

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