Alert if price is continually trending above the moving average

Discussion in 'Ask A Question' started by Customer Questions, Dec 6, 2012.

This is the TIMETOTRADE forum. Use the TIMETOTRADE Trigger Trading Technology™ to execute your trades when your Price, Candlestick, Trend Line and Technical Analysis chart conditions are met - no coding required. Trade directly in the world’s global markets. Backtest your Trading Strategies. Calculate your UK HMRC Capital Gains Tax liabilities. Manage your Investment Club. Create a FREE account today.

  1. Customer Questions

    Customer Questions John @ timetotrade

    Was wondering if there was a way of setting up an alert/multi alert to tell me if a currency pair is trading for a period like say for the last hour or last 20mins (4 bars on 5 min chart) etc... continually above/below the 10 period simple moving average.

    I am aware I could set a price crosses 10 sma alert to indicate the potential start but I am looking for an alert that gives more detail over a number of bars to indicate a potential trend in action?

    Is there a way I can configure some alerts to tell me about this trending condition?
     

    Apply for a trading account today and get the superb Trigger Trading™, Taxation and Investment Club Pro Package for FREE. Get your trading advantage.
  2. Customer Care

    Customer Care John @ timetotrade

    Yes, an an alert can be created to achieve this.

    The following screen shots will illustrate how to create an alert that will provide a notification, if the low price on the 5 minute chart is above the 10 period moving average, for four consecutive candles as per the recent price action in the following screen shot.

    MA_Trend.png


    To create this alert, four alert triggers will be grouped together in a Strict Sequence. Each alert trigger will be based on the low price being above the moving average.

    To begin, click on the 'Add Trigger' button in the Alert Builder widget.

    Set the Trigger Configuration as follows

    Trigger when:
    • Low Price (LOW)
    • Above
    • Moving Average (MA)
    Using the interval:
    • 5 minute
    Check trigger when:
    • Interval closes
    as per the following screen shot:

    MA_Trend 10.png

    Alternatively, the chart trigger icons can be used to create alerts. This can be useful if creating alerts from complicated custom indicators. In the following example the chart trigger for two lines crossing has been selected, with the first value set to the 'Low Price' and the second value set to the 'Moving Average':

    MA_Trend 2.png

    After adding the alert trigger, click on it to change action to 'Above' rather than 'Crosses Over' :

    MA_Trend 3.png


    Repeat the process of adding alert triggers four times as the 'Low Price' should be above the 'Moving Average' for four candles.

    MA_Trend 4.png


    For the next step the alert grouping should be set a 'Strict Sequence' that must occur within 15 minutes.

    To edit the alert sequence, click the box where it says 'Group in 1 day'. This opens the 'Configure Group' pop-out.

    A strict sequences means that the alerts must happen in the exact sequence that they are listed. As the time period is set to 15 minutes, no intermediate candle can spike below the moving average. To understand why 15 minutes has been used, count the time that can elapse from the first trigger condition being met to the last trigger condition being met. In this example the time that is allowed to elapse between the close of the first candle and the last candle is 15 minutes i.e. three candles after the first.

    MA_Trend 5.png


    Name the message and if you require the alert to automatically reactivate once triggered, set the alert to re-activate after for example 1 minute.

    MA_Trend 6.png


    Please note that if the alert is set to re-activate quickly, alerts will be sent on every interval where the candle low is above the moving average after four candles have been above the moving average. For example the following chart shows grey arrows indicating when each alert triggered; note that after four candles have been above the moving average, there are a series of grey arrows as the alert is set to quickly reactivate.

    MA_Trend 7.png


    To filter out this behaviour, consider changing the first alert trigger to the 'Low Price' must rise above the 'Moving Average', then adding a trigger for the 'Low Price' being above the 'Moving Average'. That means that the low price has to cross the moving average, and then the next four candle lows must be above the moving average before the alert trigger conditions are met.

    MA_Trend 8.png

    If the backtest is re-run with the first alert trigger changed, only one alert notification will be sent after the 'Low Price' rises above the 'Moving Average'

    MA_Trend 9.png
     

    Apply for a trading account today and get the superb Trigger Trading™, Taxation and Investment Club Pro Package for FREE. Get your trading advantage.
  3. Customer Questions

    Customer Questions John @ timetotrade

    Couple of quick questions I had about the settings:
    • How important is the strict sequence in 15 minutes i.e. could it be 17 18 19 mins to give it more space to trigger?
    • How does loose sequence work?
    • How does the forward testing work/how do I access it?
    • How does the back testing work/does it bring up and show on the chart each time when the alert would have triggered on the past data?
     

    Apply for a trading account today and get the superb Trigger Trading™, Taxation and Investment Club Pro Package for FREE. Get your trading advantage.
  4. Customer Care

    Customer Care John @ timetotrade

    How important is the strict sequence in 15 minutes i.e. could it be 17 18 19 mins to give it more space to trigger?

    To help with the explanation of sequencing and time frames, consider the following example, where the requirement is to receive an alert notification when the low price closes above the moving average for four sequential candles:
    alert_1.png
    In this example, the candle interval is 5 minutes. As per the above example the alert triggers are grouped in a strict sequence with a 15 minute time frame. The alert triggers are evaluated on the close of each 5 minute candle i.e. 'check trigger when the interval closes' (see screen shot above). The alert conditions will be met on the close of Candle 'D' because candles 'A', 'B', 'C' and 'D' closed above the moving average within a 15 minute time frame, where:
    1. Candle A was evaluated at 13:00 hrs
    2. Candle B was evaluated at 13:05 hrs
    3. Candle C was evaluated at 13:10 hrs
    4. Candle D was evaluated at 13:15 hrs
    The time that elapsed between Candle A closing above the moving average and Candle D closing above the moving average was 15 minutes. Therefore if the requirement is for the four candles to close above the moving average in sequence without any gaps in between, the 'Strict Sequence' time frame should be set to '15' minutes.

    If it was acceptable for the Low price for two candles to be below the moving average, as per the following example, then the time frame could be increased to 25 minutes:
    alert_2.png
    In this second example the alert trigger conditions are meet in the following order:
    1. Candle A was evaluated at 13:00 hrs
    2. Candle B was evaluated at 13:15 hrs
    3. Candle C was evaluated at 13:20 hrs
    4. Candle D was evaluated at 13:25 hrs
    As a 5 minute candle is being used in this example, any incremental changes to the Strict Sequencing time frame should be made in 5 minute increments.
     

    Apply for a trading account today and get the superb Trigger Trading™, Taxation and Investment Club Pro Package for FREE. Get your trading advantage.
  5. Customer Care

    Customer Care John @ timetotrade

    How does loose sequence work?

    Consider the following alert example with following three alert triggers:
    1. The low price must be above the moving average
    2. The low price must be below the moving average
    3. The low price must be above the moving average
    If Strict Sequence is used and the time frame is set to any time frame i.e. it does not matter how long it takes to happen, then the alert will be triggered when the following candle events occur:
    alert_3.png
    where:
    1. Candle A low was above the moving average
    2. Candle B low was below the moving average
    3. Candle C low was above the moving average
    If the following candle pattern occurred, the alert conditions would not be met using Strict Sequencing because the low price for candles B and C where below the moving average.
    alert_4.png

    If Strict Sequence is used, then no intermediate alert trigger conditions can be repeated. However if Loose Sequence is used, intermediate alert trigger conditions can be met repeatedly. In the above examples if Loose Sequencing was used, then an alert would be sent for both set of candle patterns.
     

    Apply for a trading account today and get the superb Trigger Trading™, Taxation and Investment Club Pro Package for FREE. Get your trading advantage.
  6. Customer Care

    Customer Care John @ timetotrade


    Apply for a trading account today and get the superb Trigger Trading™, Taxation and Investment Club Pro Package for FREE. Get your trading advantage.
  7. Customer Care

    Customer Care John @ timetotrade

    A related help video on how to create an alert to provide a notification for when the Low price is above the Moving Average for four consecutive Candles. The alert is then used to test a Mean Reversal Trading Strategy.

     

    Apply for a trading account today and get the superb Trigger Trading™, Taxation and Investment Club Pro Package for FREE. Get your trading advantage.

Share This Page

Open a FREE TIMETOTRADE account today:
Execute your Trigger Trading™ strategies automatically in the world’s global markets. Apply Now to try our superb platform and get your trading advantage.
170+ Technical Analysis and Candlestick Pattern Indicators - learn more
Back Test Trading Strategies - learn more
Manage your Portfolio and calculate UK HMRC Capital Gains liabilities and SA 108 CGT Return - learn more
Manage your Investment Club and generate UK HMRC Investment Club Tax Return Form 185 - learn more