Last Two Highest High and Lowest Low Lines – Yearly Quarterly, Monthly, Weekly, Daily, 4 Hour and 1 Hour

v10.3
Last Two Highest High and Lowest Low Lines – Yearly Quarterly, Monthly, Weekly, Daily, 4 H ...

At the start of a new period this indicator draws lines connecting the previous two periods highest highs and previous two lowest lows. It then projects these lines forward throughout the latest period.

It can find the last two yearly, quarterly, monthly, weekly, daily, 4 hourly and 1 hourly highest highs and lowest lows and draw lines connecting them and projected forward until the start of a new year, quarter, month, week, day, 4 hour period, 1 hour period when new lines are drawn.

You can turn on or off the lines connecting the highs and lows and also turn off the projected lines using the settings ‘Lines’ and ProjectedLines’.

The indicator can be used on any time frame chart but if there is not enough data to provide two HH or two LL then it won’t draw any lines for that time period. You can only draw slower time frame lines on a faster time frame chart so for example you obviously cannot draw H1 lines a daily chart

For daily calculations Sunday candles are included in Fridays data so the projected lines on a Monday are from the Thursday daily HH and daily LL and the daily HH and daily LL of Friday and Sunday combined. Weeks start at the open of the Sunday candle.

Each line is labelled at its end. If projected lines are shown then the label is at the end of the projected line if not then it is at the end of the line connecting HH’s and LL’s. Because it is not possible to draw something and then delete it there are no labels on the last  projected lines shown on the chart. To overcome this issue you can add my other ‘Last Two Highest High and Lowest Low as Horizontal Lines – Yearly Quarterly, Monthly, Weekly, Daily, 4 Hour and 1 Hour’ indicator to your price chart and turn off the values and lines in that indicator. This will give you up to date labels.

The projected lines can go a little wobbly on very fast time frames which I assume is due to missing candles messing up the barindex value used in the projection calculations.

Apply only to the price chart

The lines can be used as support and resistance or for breakout trading – however you wish.

It will be slow to draw if you want every line drawn on a lot of historical bars.

I suggest downloading and importing the indicator to get full functionality.

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. Vonasi • 04/11/2019 #

    There has been a minor bug fix as lines were drawn incorrectly if both HH or both LL values were identical. The code and ITF file in this library post have been updated. Anyone who has already downloaded or copied the code should now download v1.1 or copy the amended code found here.

  2. Vinks_o_7 • 04/11/2019 #

    Thanks !

  3. dario ti • 04/11/2019 #

    Thank you!

  4. Razz • 04/11/2019 #

    Hello Vonasi super indicator! is it possible to extend the indicator by the time scales M10 and M5?
    Thank you

  5. Razz • 04/11/2019 #

    Hello Vonasi
    I found out myself how I can change it.
    Thanks again for the indicator

  6. Pottar24 • 04/11/2019 #

    HI Razz can you tell how you managed to do it ?

  7. Pottar24 • 04/11/2019 #

    VONAZI super indicator thank you. Can you provide me a code that gives me the two latest max e min without any drawn lines? Thank you very much

    • tobytarczy • 04/11/2019 #

      hi,

      Is there a simple way to draw downwards and upwards trend lines on a specific timeframe. For example on a monthly chart the downward trend line would take the barindex with the high point and then look for the next barindex with the second highest point, and same for the third point. Included would be a parameter for the period as well. Now that i have played a bit with some coding I can’t see that this is too hard.

      I have an image I can share, however not sure how to do it from here.

      thanks in advance
      Toby

  8. Vonasi • 04/11/2019 #

    Images are not possible in library posts. It is best to start a topic in the forums.

  9. tobytarczy • 04/11/2019 #

    Apologies for not responding sooner. I have been busy completing a professional FX training course. To my earlier comment above, and from what I have been taught by a institutional FX trader the trend lines are crucial for the technical analysis in support of the the fundamentals. I am not sure of your situation however I am trying to establish these trend lines automatically as these need to be adjusted everyday at the start of the trading session for the currency pair in question within the prescribed timeframes being, monthly, weekly, daily and hourly. I am not a coder however I have been able to manipulate some PRT code to create automatic Fibs based on ABCD patterns. Would it be possible to have a dialogue whereby I can explain in more detail what I am trying to accomplish and get your opinion the best way in which to approach this. I don’t think it is difficult however there are some specific conditions that need to be considered for this to work in a way where the charts are automatically updated. I look forward to your response.
    All the best for now.

    Toby

    • Vonasi • 04/11/2019 #

      Sorry – I’m out sailing in Greece for the summer and not coding anything so I can’t help at the moment.

  10. tobytarczy • 04/11/2019 #

    Hi Vonasi,

    Sounds lovely, I race yachts around europe myself. Most regattas cancelled unfortunately.

    Enjoy the sailing, and if you have a chance once your back to look at the code I have been trying to piece together I would be very grateful. I am very keen on the “Projected Lines” feature you have incorporated as this is what makes the Trendlines work on the FX charts

    Many thanks
    Toby

  11. mlouys • 04/11/2019 #

    Hello Vonasi thank for your work ! A question how can we do it for minutes ( or 15 min or x minutes ) times frames ?

    Many thanks in advance !

    • Vonasi • 04/11/2019 #

      I think that would be possible but probably in a whole new indicator as detecting when a new 5 minute or x minute bar starts could lead to some incorrect lines being drawn on slower time frame charts as we need to use the MOD instruction to test if our x divides into the closing time of each candle – which it would do a lot on slow charts. I’m a bit busy right now (sailing) but I’ll try to find some time to adapt it if I can…. don’t hold your breath though!

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
Yannick Hello There is a mistake in trailing stop code, I think that this should fix the problem s...
Paul About the trailing-stop the way it's coded. That works for backtesting only, just look at th...
Jonny sorry paul, but system says that is not possible to put many stop order combined...what have...
s00071609 I am using this indicator but it keep crashing as i change the timeframe. For example, chang...
Nicolas in the mean time you can try this one: https://www.prorealcode.com/prorealtime-indicators/ho...
Gianluca Is it possible to have an indicator where those value are as instogram ? and separated? in o...
Nicolas Oui pourquoi pas? :)
claudiofred Bonjour Nicolas, merci encore pour ce super indicateur. se demander s'il est possible d'écr...
Nicolas Screener déjà présent sur le forum ici: https://www.prorealcode.com/topic/indicador-lastmans...
bazilou pouvez expliquer donchian bias merci
rb-72 Thank you, area of twist by dilatacion of the price, missing part of the code that is not pu...
Thomas007 after reading your blog now I understand why there is only a part of your code here. I'm try...
Juanjo Hola¡¡ la estrategia se podria aplicar sobre acciones con marco temporal diario?? gracias.
TempusFugit Masala, thanks for your contribution. I don´t like the offmarket spreads neither ;) I unders...
Uveus Tempus, me da un error al validar el codigo, sobre la variable N. Al crear el indicador me ...
TempusFugit Hi Uveus, I am guessing you inserted the code of the indicator into the system code, is ...
jobswaps vaya eres increible
jobswaps sigue subiendo mas contenido
Brisvegas If it seems to good to be true it is . Any long only system started at multi year lows will...
Nicolas https://www.prorealcode.com/topic/ayuda-screener-indicador-perfect-trend-line/#post-51291
Manu L. Bonjour Nicolas, suite a une de mes precedentes demande dans le forum indicateur, j'ai touv...
AntoGH C'est selon moi le meilleur indicateur, que j'ai vu, si vous trouvez mieux dîtes moi car dif...
Jiacky mma = average[per,1](close) should be mma = average[per,1](close * 1000). Otherwise TDF will...
Trading_En_El_Ibex35 El screener no busca acciones que estén en máximos absolutos , busca acciones en las que el...
Andraxx lo de volumen aceptable, lo dices en relación al Ibex 35 supongo. Porque se margen de volume...
Juanjo Hola Queria preguntarte si la idea de maximos anuales es tuya, o bien está basada en el sis...
juanj And the point of violation is the close of the candle that violates the line by generating a...
juanj For the latest version of the strategy or to follow updates and developments see the thread ...
phanz i backtested it with 10K units of EURUSD 1 hour i get an equity curve that is going one way ...
Wing Not yet but I plan to.
Leo Have a look in this Forum, I got something interesting for you... https://www.prorealcode.co...
Dávid Gyalus Dear Wing, As I am a daytrader, and one of my best friend is a programmer we think your a...
haseluis Hello, who can help me why the screener does not work // Der folgende Code bezieht sich auf...
Nicolas Hello, please ask your question with a new forum topic, this is not the place to ask for sup...
rejo007 hello david, i'll try it could you tell me wich strategy do you use in real? thanks
David Somogyi Hello, I have a couple of DAX strategies of breakout and mean reversion. I'll try to post...
Roberto Blázquez Hi David, I just saw your strategy and it's good!!! I'm going to try it from today in real a...
Nicolas Questo indicatore è stato progettato solo per i dati intraday, ma potrebbe essere adattato a...
MrCrous //FR Bonjour, Dans le code ci dessus, je ne comprends pas ce que fait la ligne : linea...
Nicolas J'ai déjà répondu à cette question quelque part sur le forum. Il faudrait chercher un topic ...
juanj To follow new developments or get the latest version of this strategy please visit the forum...
tahar Hello Juan, I wanted to test Universal Strategy via a demo account on PRT but nothing happen...
BravoDelta @juanj wondering if you may help me please. I am looking for a simply strategy to use on the...
Wing There's a few threads on the forum about backtest and live trades being different at times. ...
ET I agree with verdi55. As it is now, the code will only test for a breakout on the upside (li...
Philipjonasson are u still active Wing?
poonsl2828 Hi! Francesco I have test it on GBP/USD but it only have a trade on 9 Jun which i backtes...
ullle73 why not use 1h chart? has 95% hitrate
ullle73 i see most of positions are only 1 pip before exit?

Top