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
Gaspare Ciao Ivan si puo' inserire una strategia su questo indicatore per ottimizzare le variabil...
jacquesgermain sì da aggiungere
Maik2404 auf welchen Wert muss ich die Kompresionsperiode stellen?
jacquesgermain — Période de compression : ce paramètre détermine la période de rétrospection utilisée pour ...
jacquesgermain Bonjour non pas de soucis car src=customclose donc dans le menu configuration/propriété me...
geroniman Merci Jacques , indic tres utile. J'ai un indic à programmer avec du price action. es tu dis...
jacquesgermain ok pour regarder ...
Nicolas
1 year ago
f1_maik Ein sehr schöner Indikator, vielen Dank. Wenn ich den Indikator importiere und starte hat d...
Nicolas das ist in der Tat normal, Sie müssen die Auf- und Abwärtsfarbe direkt im Parameterfenster d...
FXtonio Bonjour Nicolas, merci pour cette merveille, je l'utilise en compl2ment du "magical buy sell...
supertiti Bel outil si on ne se tape pas sur les doigts avec ! Comment ajoute-on une image avec le co...
magnus59 Hi Nicolas, thaks for your great work here, I need a scanner for the swedish OMX when ma...
Nicolas Yes, sure please open a new topic in the ProScreener forum section, thank you.
paullyons Hello! Thanks for post your indicators. I'd like you to let me know how to draw lines for ...
Rafa Hi Nicolas! I can´t install this indicator. it installs in a separate window not as an av...
Nicolas Add it on the price, see how: https://www.prorealcode.com/blog/video-tutorials/how-to-add-an...
Frankyslo1 No consigo instalarlo en el precio en PRL-version 10
RakeshPoluri I have a question about the bands on the candles. Is it bollinger bands or something else?
Nicolas I think that's 2 Bollinger Bands
Emperor.it "style(line,2)" C'è una guida ai parametri che si possono modificare ? Tipo stile della lin...
IV Mcm https://www.prorealcode.com/programming-with-prorealtime/
fazel53 How do i attach this indicator to my mt5 platform?
Nicolas You can't! All indicators here are for ProRealTime trading platform: https://www.prorealtime...
Manu L. Bonjour Nicolas, j'ai créé un screener avec l'aide à la prog en TF weekly mais je voudrai...
wtangsiri C'est exactement le même signal que donne le croisement et le décroisement de deux EMA (7 et...
PHAN100 bonjour, j'ai un bug sur le programme recopié prorealtime me dit qu'il y a un problème à ...
PHAN100 bonjour, bravo à l'auteur pour cet indicateur visuel sur le graphique, il nous reste à va...
Nicolas c'est exactement ce que je fais entre les lignes 58 et 64 pour pouvoir tracer la ligne complète
Italo Fabian Nicolas, Ces matrices sont-elles des vecteurs unidimensionnels ou multidimensionnels? Depu...
Denis Bonjour Nicolas et RicLg, Merci Nicolas pour cet indicateur intéressant et merci RicLg pour...
Nicolas Il faut l'ajouter sur le prix avec l'icône de la clé situé en haut à gauche du graphique du ...
jerome777 merci de ta réponse
jerome777 bonjour c est bon il fonctionne parfaitement merci beaucoup
yeoreum Thank you very much for the screener, it reminds me on Minervini VCP. How to change th...
reecet any codes like this but in minutes and hours rather than days?
PHAN100 bonjour, je viens de tester ce screener, je constate une anomalie...il ne renvoie pas l'e...

Top