Random trades?

  • This topic has 4 replies, 2 voices, and was last updated 7 years ago by avatartom.
Viewing 5 posts - 1 through 5 (of 5 total)
  • #72095
    tom

    Hi Team, recently started playing around with building a trade system, however run in some behaviour i can’t explain.

    I built a simple indicator:

    If 2 consecutive green bars, return 1, if 2 consecutive red bars, return -1

    Then I added a very simple trading system. Buy when the indicator returns 1, sell when indicator returns -1. It also draws a black arrow on the graph in these instances.

    I also configured simple SL and TP.

    When I run the system on dax against past data (21 ticks), i get seemingly weird behaviour. a buy or sell should occur at the start of the next bar according to my understanding, but this is not always the case. also some buy/sells seem to happen in middle of nowhere. Any thoughts what I’m missing?

    #72160

    Do the problem exist on a time based timeframe? such as a 1 minute one for instance?

    Also, please share the indicator’s code to get a complete understanding. Thank you.

    #72162
    tom

    Hi Nicolas,

    not sure for the 1 minute. Are you saying it’s because I’m at a ticks based timeframe? Is that supported by PRT?

    Please find hereby the code.

    Cheers

    Tom

    #72165

    Non time-based chart are not compatible with real automatic trading (such as the ticks chart), but it works in backtests. I think that the differences you get between the indicator and the ticks chart are coming from the fact that the data history between ProBacktest and ProBuilder are not starting from the same exact tick, depending on how much bars are displayed on your price chart.

    21 ticks chart are automatically rebuild from 1 tick chart each time they are loaded.

    Test the strategy on a 1 or 5 minutes timeframe to see if the differences still occur.

    #72166
    tom

    Mmm, ok, This was just a simple test. was looking to build something for scalping. 1 minute timeframes therefore would not be granular enough. Any plans to add tick based automated trading?

    Thanks for the quick reply.

    Cheers

    Tom

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

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