V11 dynamic rectangle from moving average breakout zone to any future bar

v11
V11 dynamic rectangle from moving average breakout zone to any future bar

A request was made in the Probuilder forum, to display a rectangle starting from the price crossing a moving average 20 and continuing to the right of the price thanks to v11 new capability, with same height as breakout candle, and only showing the latest active occurrence.

continuer dessin vers la droite

Use N as how many bars to the right of the latest price you want to extend the rectangle to.

Use period to customise the moving average

It is not much to look at in terms of graphic output, but if you recently had an update to PRT v11, it shows you the simplest way to code a self-refreshing drawing in the present triggered by a single event in the past and still able to extend  in a constant way in the future no matter how long ago the triggering event was.

Therefore you can use the concept and easily adapt the code with something else than a moving average to suit many other needs you may have to highlight anything.

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. Roland57800 • 01/03/2021 #

    Bonjour Noobywan,

    si je comprends bien l’utilisation de ce code que je trouve particulièrement intéressant,
    on achète de suite au dessus du rectangle qui correspond donc au breakout et à l’inverse sous le rectangle pour une vente

    C’est bien ça.
    Merci pour une confirmation
    Cordialement

    • Noobywan • 01/03/2021 #

      Bonjour, quand la question a été posée dans le forum à celui qui avait fait la requête en amont du code (lien ci-dessus dans le texte “continuer dessin vers la droite”), il n’y a pas eu à ce jour de réponse sur la façon dont il l’utilisait. Je me garderai bien de répondre à sa place sur ses intentions. Je peux juste ajouter qu’à titre personnel je n’utilise pas un franchissement de moyenne mobile comme signal d’un trade ou sa trace passée comme signal du trade opposé, ni les stratégies de breakout. Et que c’était une requête probablement davantage graphique que de trading systématique. L’intérêt graphique du code était fin 2020 au déploiement de la v11pour les comptes IG de montrer à tous les nouveaux utilisateurs v11 qui n’avaient pas encore en main les nouvelles possibilités quand le forum regorgeait de questions sur celles-ci, qu’on pouvait désormais grapher sur la droite du prix pas seulement de façon statique mais aussi dynamique.

  2. Fabian • 01/03/2021 #

    This Code draws only a retangle if the condition has been confirmed and NOT before (in that case a simple crosses over SMA)

    defparam DRAWONLASTBARONLY = true

    sma5 = Average[5](close)

    BeginnRechteck = 5
    EndeRechteck = 15
    Counter = LastSet($RechteckStartBar) + 1

    if barindex > 1 and (close[1] crosses over sma5[1]) then
    ObereSeite = close[1] + 40 * pipsize
    UntereSeite = close[1]

    // Speichert die Koordinaten des Rechtecks in Array-Variablen
    $RechteckStartBar[Counter] = barindex – 1 + BeginnRechteck
    $RechteckEndBar[Counter] = barindex – 1 + EndeRechteck
    $RechteckObereSeite[Counter] = ObereSeite
    $RechteckUntereSeite[Counter] = UntereSeite

    // Aktualisieren des Zählers
    Counter = Counter + 1
    endif

    // Zeichnet alle gespeicherten Rechtecke im Chart
    for i = 0 to LastSet($RechteckStartBar) do
    DRAWRECTANGLE($RechteckStartBar[i], $RechteckObereSeite[i], $RechteckEndBar[i], $RechteckUntereSeite[i]) coloured(0, 0, 255, 20) bordercolor(0, 0, 150)
    next

    return

    https://ibb.co/Fsqh4bj

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
Rafa And the PriceMAPeriod? aren´t the same?
Nicolas The PriceMAPeriod is the period to make the average of all the last X medianprice found.
Rafa Thanks a lot Nicolás. Have a nice day
Eric If you have a high percentage winners and the trades are closed with take profit the spread ...
Casenova I Agree with you JaunJ, and Yes Eric, what you say makes sense too. Optimizing the Stop Loss...
ET Thanks for the system Casenova. In determining the high of the past 4 bars, is there a reaso...
ak5hay2 Works like crazy on bitcoin. Use different timeframes. Thanks a lot Doc!!!
richyowen Hi, great code thanks. Very new to this forum. Is there a way to add a 100point target on an...
lisamitch50 Morning all, Just backtested on quite a few instruments, worked well on backtesting, but tel...
reb Hello have you used this strat since last year ? live or Back test ? What are the results ?
beeb Yes last Year. But only back test
drysheep Hi all, did anyone test this strategy recently? As i dont get a single trade in the backt...
Nicolas
6 years ago
Nicolas Merci, faire une demande dans le forum approprié.
Pere Thanks for this good indicator Nicolas. I would like to make the upper and lower limits mor...
Nicolas because fractals are known 2 bars later! that's why I used rectangle to plot them in the past.
swapping merci gabri, on va le mettre à l'essai ;)
Alai-n Merci pour ce travail...
patmaba merci Alai-n. C'est ma première participation sur prorealcode, merci pour à toi pour ton co...
longtrade Can this be converted to a screener?
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
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 ...
Leo Hi all, I posted a new version of this indicator ( I just add arrows to spot the local maxi...
Trading_En_El_Ibex35 Muchas Gracias por compartir este interesante indicador. Un saludo
xavieralava hola gracias leo
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...
Khaled Thanks, but if I may ask what's EMA Period? The price which reverses the EMA[20] is not the ...
Francesco78 EMA is not a moving average, it is just the name we called the quantity defined above
Khaled My bad. Thank you so much!
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 ...

Top