Backtesting chooses entries and exits at random

Forums ProRealTime English forum ProOrder support Backtesting chooses entries and exits at random

Viewing 7 posts - 1 through 7 (of 7 total)
  • #111576

    Hi Everyone

    I am quite new to ProRealTime. I have made a number of short programs, but am puzzled by my latest program which gives entries and exits seemingly at random. I have created the program with ‘simplified creation’ and then modified it slightly (same result without any modification as well).

    It is very simple. When two moving averages (21 and 50 period) are both moving up I want to create a buy order. When the 21 starts to move down I want to close the position. I am running the code on the US 500 Cash 5 min market. The code even enters a buy when both moving avergaes are moving down. I am very confused.

    Last point, if one creates a Hull moving average with the simplified creation, the code defaults to simple moving average. There does not seem to be a programming option for the Hull at all. I have seen other people say similar on the forums but no definitive answer to date.

     

    #111588

    What timeframe are you running your code on?

    I ask because if a low TF (1 min, 5 min) then it may be difficult to spot the difference of say 1, 2 or a few pips on the MA’s??

    Give an example of a random entry / exit date & time and I’ll try and reproduce on my Platform.

     

    #111593

    Hi GraHal

    I am using this on the 5 min chart. See attachment for trades over the last few hours. Time is CET +1.

    At 22:15 there is an entry an 1 candle later an exit. Both MA’s are moving downwards so there should not be any entry.

    Thank you

    #111596

    Analyst – Welcome to the forums.

    Your topic has been moved to the ProOrder forums as it is a strategy related topic rather than a general discussion. Please try to post in the correct forum with future topics. 🙂

    #111597

    What instrument are you testing on? It is not mentioned in your first post or shown in your screen shot. We cannot recreate what is happening without all the info!

    Also are you sure that the MA’s on your chart are the same as in your code? Just trying to eliminate the usual basic mistakes before delving deeper.

    Using GRAPHONPRICE to show the MA values directly from the strategy is usually a good way to avoid confusion.

    1 user thanked author for this post.
    #111608

    I am doing this on the US 500 Cash (see first post). The attachment is for this market.

    #111620

    There you go … using GRAPH and Cursor details (as Vonasi suggested) … shows that in fact Ind1 and Ind2 are rising as per your entry code.

     

    2 users thanked author for this post.
Viewing 7 posts - 1 through 7 (of 7 total)

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