How to Stop System Trading During Consolidations?

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #37547 quote
    Trevor Smith
    Participant
    New

    I have a system with a Supertrend crossing a Moving Average.   For the most part it works very profitably.   However about 10% of the time it runs into nasty consolidations which trigger multiple losing trades within a short period.    I looked at ADX and RSI indicators but they don’t help indicate such consolidations.   Increasing the timeframe to, say, 6 hour charts, avoids consolidation losses but also misses profitable trends.   Is there any way of programming-in a system shutdown, for safety, when such whipsaw conditions arise (later re-starting manually)?

    Oh, one other newbie question: when a system is set to run, presumably it has to wait for its first opening condition to be met — BUT can I open a trade manually, THEN switch the system on to take over?   Thank you.

    #37586 quote
    GraHal
    Participant
    Master

    Look under documentation / search on this site at Commands …

    Quit
    PositionPerf

    Re … BUT can I open a trade manually, THEN switch the system on to take over?  … I’ve always wanted to do this also, but never got around to coding it.

    Maybe you could set a simple condition that would always enter a Trade (Close > Low or Close = MA[1] or similar) and use this with the ‘Once’ Command? So the simple condition only runs, well erm once! :)?

    If you wanted above to enter a Trade as soon as you start the Bot then you would of course need to be using a 1 second TF or wait until the end of the 1 H TF (if using 1H TF). Maybe best to wait until multitimeframe is available on PRT then the 1 sec TF could be under control of the ONCE condition?

    GraHal

    #37707 quote
    Trevor Smith
    Participant
    New

    Prorealcode is very powerful in terms of its potential.   ‘Flicker’ could be an issue if two indicators failed to make a clean cross; glancing crosses could trigger repeat trades.

    The obvious way to test my latter question would be to start a trade manually on the chosen cross, then switch the chosen system ON.   Does Prorealcode detect that there is already a trade open on that instrument?   Conversely, for emergency shutdowns, can I close the trade manually and, at the same time, switch off that system running?   Thanks for your help — much appreciated.

    #37720 quote
    GraHal
    Participant
    Master

    Re Flicker … code / conditions are only checked at the end of each bar (not tick by tick) so Flicker during a bar won’t trigger a trade. Stops at price levels can be hit mid-bar as these are set for the next bar at the end of the previous bar.

     Does Prorealcode detect that there is already a trade open on that instrument?  I cant think how, manual trades are kept separate from auto trades.

    Can I close the trade manually and, at the same time, switch off that system running?  Yes I do it often … in one of two ways, see attached.

    Nicolas thanked this post
    Trevor3.jpg Trevor3.jpg Trevor4.jpg Trevor4.jpg
    #37827 quote
    David
    Participant
    Veteran

    For consolidation detection I would consider using Average True Rang or tightening of the Bolinger bands.

    #37918 quote
    Trevor Smith
    Participant
    New

    Bollinger Bandwidth (20, 2) : only trade if Y-axis above 0.007 on a 1-hour chart.   It’s very fitting, lah!

    Good suggestion Dave but can PRT incorporate the condition?   It’s not possible to set a horizontal line at that level with this indicator.

    #38004 quote
    Maz
    Participant
    Veteran

     I looked at ADX and RSI indicators but they don’t help indicate such consolidations.

    Combination of FDI (Fractal Dimension Index), ATR, ADX, moving average gradient(s) or slope and market profile (you’ll need to code up the market profile for yourself though)

    #38033 quote
    GraHal
    Participant
    Master

    Mmm not easy eh Trevor?

    Try the Aroon Oscilator … see section on Consolidation just above conclusions near the bottom.

    http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:aroon

    GraHal

    EB thanked this post
    #38052 quote
    David
    Participant
    Veteran

    Trevor you can do as you would like as it’s only a simple math equation to express:

    tight = BollingerUP(close) + 0.0007*pipvalue // I think it should work

    I was thinking:

    tight = abs(bollingerUP(close)-bollingeDown(close))

    IF tight < x THEN…

    Actually I just did a search in the documentation… and https://www.prorealcode.com/documentation/bollingerbandwidth/

    #38239 quote
    Trevor Smith
    Participant
    New

    Aroon is a more-definitive form of ADX (momentum indicator) but without the lag.   Set to 17 on the 1-hour chart it averts consolidations well and can give candle-perfect starts-of-moves.    Thanks.

    GraHal thanked this post
Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.

How to Stop System Trading During Consolidations?


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 9 replies,
has 4 voices, and was last updated by Trevor Smith
8 years, 9 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 06/06/2017
Status: Active
Attachments: 2 files
Logo Logo
Loading...