Find Highs and Lows in a specific time period

Forums ProRealTime English forum ProBuilder support Find Highs and Lows in a specific time period

Viewing 12 posts - 1 through 12 (of 12 total)
  • #125934

    Hi I am wanting to develop a strategy that works manually but requires a specific time period to be monitored, but I amd not sure how to do this. For example:

    Period to monitor (GMT) 10.00am to 11.00am

    During that period I want to establish the highest point and the lowest point10am – 11am Highest Price

    I would then enter the market long (If the trend is up) any time after 11am up until market close at the break of the highest price.

    So in summary I need to find the highest and lowest prices between a specified time period and then set the entry points at the low or the high once these levels are broken after the end onf the monitoring period e.g. after 11am (say) and before market close.

    Please see the annotated screen shot attached.

    I hope this makes sense?

    Thanks in anticiapation

    #126093

    Hi,

    Unfortunately I cannot test it with realtime data since I don’t have it, but this indicator does just that. You select a start day of the month and a span on how many days it should monitor, once the monitor is over finds the highest and lowest and creates and indicator of those two values. You can probably try changing from Day to Hours and have a look if it works for you.

    Once you have the indicator it is pretty easy to backtest it. Hope this helps.

     

    1 user thanked author for this post.
    #126098

    Something like this perhaps.

     

    1 user thanked author for this post.
    #126128

    Thanks Vonasi, I’ll give it a whirl.

     

    #126134

    Hi Vonassi

    This seems to work ok, thanks. However it forgot (apologies my fault!) to say that I only want it to trade once per day after 11am and vilid entry until the FTSE close. it then needs to reset for the following day.

    Please see my initial code for a long trade below(Please note I run it on 1 min timeframe to enter):

     

    #126147

    Perhaps like this? Not tested and I’ve had a couple of glasses of wine!

     

    1 user thanked author for this post.
    #126208

    Thanks again – giving it a go today – if it works Vonassi, I’m going to try programming with wine!!!

    Steve

    #126286

    Thanks Vonassi, this seems to work a treat in back testing.

    Steve

    #126289

    No problem but it is Vonasi with one ‘s’ otherwise my name becomes ‘V-oyaging O-n A S-maller and S-maller I-ncome!

    #126291

    Ha -apologies Vonasi, I must have a typing stammer!!

    #127410

    I’ve developed this code further using different conditions for detecting trends, hence confirming entry over different timeframe. However looking at the results it seems that the 1 hour momentum filter I have used seems to take a precedence i.e. several of the trades start exactly on the hour?

    You will also note that I have used the “Starttime & Endtime” twice one on the default timeframe and once on the 4 hour timeframe. These conditions define the period when I want to determine the Highest Point or Lowest Point (hh &ll) during that period for my entry levels.  I have done this twice as I had an anomaly where the code entered into a trade much later in the day, not at the previously defined price entry level (ll) but when the 8 ema crossed under the 20ema? This seemed to be a fix, although I didn’t understand why it would do that in the first place.

    So my question to you good people is:

    1. Is there a preferential order in which conditions for entry observe
    2. Is there a better way for my trend detection filters to determine downtrend i.e.
      1. Check 4 Hour period for 8EMA < 20 EMA
      2. Check 20 hour OBV > 20 EMA
      3. 3 Check 1 Hour Momentum >horizontal zero line
      4. THEN enter at previously determined entry level at ll ONCE per day only

    Hope this makes sense and I have loaded up my current FTSE code (running on 1 min chart) and the screenshot of the results

    Steve

     

    #127416

    I’ve only glanced at it but this does not look right:

    The four hour chart will have candles at 000000 040000 080000 120000 and so there is no 100000 candle.

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

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