Buy Sell Magical Trend

Buy Sell Magical Trend

The Buy Sell Magical Trend indicator is a “trailing stop” style indicator made of trend inversion obtained with Bollinger Bands. SignalPeriod is the period of the Bollinger bands and ArrowPeriod the standard deviation applied to it.
The arrows are painted on the breakthrough of the other side band with segments connecting the 2 most recent arrows.

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. FXtonio • 04/17/2023 #

    Bonjour Nicolas, génial cet indicateur, plutôt précis (67% de trades gagnants) merci 🙂

    • Nicolas • 04/17/2023 #

      C’est “magical” ! Bonne continuation 🙂

    • RICOU • 04/17/2023 #

      Bonjour, quelle est la meilleure UT pour travailler avec cet indicateur?

    • FXtonio • 04/17/2023 #

      @RICOU en 1 minutes avec un filtre de tendance ZLSMA 200 et eventuellement un rsi 7 , 69% de trade gagnant rr 1.5

  2. superfalcio • 04/17/2023 #

    Hello Nicolas, just started having a look on this last indicator : what timeframe this default parameters are working better? and as forex than indeces? thank you 🙂

    • Nicolas • 04/17/2023 #

      I don’t know, this is your part 🙂

  3. gioport • 04/17/2023 #

    Bonjour Nicolas…..
    est-il possible de construire un écran …. merci

    • Nicolas • 04/17/2023 #

      Merci d’ouvrir un sujet sur le forum avec une description complète du screener.

  4. RICOU • 04/17/2023 #

    Bonjour Nicolas, est il possible d’avoir un codage complet d’un trade automatique avec les paramètres de cet indicateur ?

    • Nicolas • 04/17/2023 #

      Oui, merci d’ouvrir un sujet dans le forum ProOrder pour créer une stratégie avec cet indicateur.

  5. Chrisinobi • 04/17/2023 #

    Hallo Nicolas eine Tolle Arbeit, wie immer !!!! Eine Frage zu Deinem Indikator, könntest du es so bauen, das man ein Signal auf die Pfeile setzen kann ???? Danke

    • Nicolas • 04/17/2023 #

      Ändern Sie die letzte Zeile des Codes mit:
      return ts coloured(r,g,0) style(dottedline,2), trend as “trend direction”
      um den Trend zu erhalten (1=grün, -1=rot)

  6. Chrisinobi • 04/17/2023 #

    Danke Nicolas, vielleicht habe ich mich verkehrt ausgedrückt, ich will gerne einen Alarm auf dem Pfeil haben um damit Automatisch einen Trade zu beginnen. Wenn das so möglich wäre ??? Nicht als Algo einfach nur in der Alarmeinstellung, um nicht ständig den Bildschirm zu beobachten müssen. Vielen Dank

    • Nicolas • 04/17/2023 #

      das ist richtig, man kann die Warnungen nicht codieren, also muss man das integrierte Tool der Plattform verwenden.

  7. Chrisinobi • 04/17/2023 #

    Ich Denke, ich habe es begriffen, in den Alarmeinstellung einfach, kreuzt über Wert 1, als Buy und kreuzt unter Wert -1, als Sell. Nochmals Danke

  8. aldtrading • 04/17/2023 #

    Merci pour votre travail.

  9. JC_Bywan • 04/17/2023 #

    For people interested in the screener: https://www.prorealcode.com/topic/screener-buy-sell-magic-indicator/#post-214201
    For people interested in a strategy: https://www.prorealcode.com/topic/buy-sell-magical-trend/

  10. octum • 04/17/2023 #

    Gracias NJicolas. Las lineas 35 y 36 dan fallo. (¿Es adrede para iniciados?)
    Puedes corregir porfa? Gracias.

  11. mortezaali14 • 178 days ago #

    Salut Nicholas, comment exécuter ce fichier dans les métadonnées

  12. Leduc71 • 15 days ago #

    Bravo ! Cet indicateur est un suiveur de tendance, type “stop and reverse”, inspiré des canaux de volatilité.
    Il fonctionne bien en tendance mais peut donner de faux signaux en range.
    C’est un outil robuste, populaire, à condition de bien régler les paramètres selon l’actif et la période.

    Points forts :
    Clarté : L’indicateur donne des signaux nets, faciles à lire sur le graphique.
    Suit les tendances : Il permet de “coller” à la tendance du marché, en sortant lors des retournements majeurs.
    Approche “stop and reverse” : Toujours en position (long ou short), pas de période à l’écart du marché.
    Approche éprouvée : La logique est proche de SuperTrend ou Donchian Channel, connus pour leur robustesse.

    Limites / Points de vigilance :
    Beaucoup de faux signaux en marché range : Comme tout indicateur de tendance, il peut donner des entrées/sorties inutiles sur un marché plat ou sans volatilité.
    Réactivité dépend des paramètres : Si SignalPeriod ou ArrowPeriod sont trop faibles, on aura trop de signaux ; trop élevés, tu risques de rater le début des mouvements.
    Pas de filtre de volatilité : Il n’intègre pas d’ATR ou de filtre pour ignorer les “bruits” de marché.

    Version améliorée avec filtres ATR et volume : les signaux d’achat/vente ne sont générés que lorsque la volatilité (ATR) et le volume dépassent des seuils définis, afin de limiter les faux signaux et ne prendre position que sur les phases actives du marché (on peut régler l’ATR et Volume au besoin)

    // PRC_BuySell Magic02 – Version filtrée ATR et Volume pour UT 1mn

    SignalPeriod = 12
    ArrowPeriod = 2
    ATRperiod = 14
    StartHour = 8
    EndHour = 18

    bbup = average[SignalPeriod] + std[SignalPeriod] * ArrowPeriod
    bbdn = average[SignalPeriod] – std[SignalPeriod] * ArrowPeriod

    myATR = average[ATRperiod](tr)

    // Initialisation
    if barindex = 0 then
    ts = 0
    trend = 0
    startbar = 0
    startts = 0
    endif

    // Entrée initiale avec filtres
    if ts = 0 and myATR > 0.60 and volume > 100 and (hour >= StartHour and hour 0.60 and volume > 100 and (hour >= StartHour and hour 0.60 and volume > 100 and (hour >= StartHour and hour <= EndHour) then
    trend = 1
    ts = bbdn
    r = 0
    g = 255
    drawarrowup(barindex, ts) coloured("lime")
    drawsegment(startbar, startts, barindex, ts) style(dottedline2) coloured("blue")
    startbar = barindex
    startts = ts
    endif

    return ts coloured(r, g, 0) style(dottedline, 2)

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar

+21 more likes

Related users ' posts
rispardin no entiendo como funciana este indicador, por favor alguien podria explicar como utilizarlo???
AVT No se trata de un solo indicador, pero cada linea muestra otra información, de abajo hacia ...
IV Mcm Your indicator is interesting, I evaluated its relevance with the squeeze to detect the phas...
Kris75 Hi Gabri I launched a very simple strategy based on the 3 bars trailing stop that you cre...
TimDeCat Hi. Has anyone coded a version that you could alter it to say 5 bar trailing stop? ie make ...
Nicolas Please open a new topic in forums so we can code it there, thanks.
finplus bonjour, il y a un problème à la fin du code avec elsif (close 0 then ... ne manque t il pas...
kj1988 Hello Nicolas, thank you for this useful indicator. Could you tell me how I can remove the...
Nicolas remove lines 101 to 103
GraHal Yes sorry, I set up a link to a screen shot on my google drive and then I got locked into th...
gabri Here's the thread https://www.prorealcode.com/topic/multiframe-rsi-of-rsi/
Bernard13 Bonjour Nicolas, Pourriez-vous m'indiquer si cet indicateur fonctionne avec la V11 ? Le di...
gackeen Scusa Pier, scusate tutti, sono nuovo. Ho caricato il file e mi viene restituito il messaggi...
JR1976 HI Nicolas , I tried to copy paste but not import directly and the code works well I hav...
mcosta This code doesn't work on 10.3 platform(IG), neither with copy/paste nor with itf import, an...
HeikinAshi Do you have an update of this indicator since you've created them, or is this still the actu...
mcha Thank you for this work. Do you try to transform/put this indicator on candlesticks and is ...
Nicolas Thanks for sharing your automated trading strategy idea. Even if you accumulate loosing orde...
Maz Ok. Potential here to build onto this. Have opened a forum thread for further discussion: h...
David Balance thanks for sharing this excellent indicator.  Here are some thoughts.  please ad...
reb Hello Marc your strat seems very intersting, will take a look Reb
897148 What exactly is meant by Total price? Is r1 =28 in your example the no of days for "Total P...
otty82  THX looks good!
century nice one , thank you
arvindrao01 Hey! Does anyone have a pinescript (tradingview) code for this?
imokdesign Hi Everybody, when I look at the strategy I felt the need to implement a Moneymanagement-Sy...
Inertia newlevel then multiplier=multiplier+1 oldlevel=newlevel newlevel=strategyprofit+startequi...
Inertia Hi Bjoern, I was playing around with your code this morning (EUR/USD 5'). Thank you to the...
Nicolas An answer to a query that has been posted in the squeeze indicator: https://www.prorealcode....
Jodal Bonjour Nicolas, Merci pour cet indicateur! Est-ce possible de configurer une alerte pou...
Nicolas Merci pour le post dans le forum en respectant les règles de publication énoncées dans le ca...
Dron De lo mejorcito
CavalierDeCesDames Bonjour Nicolas, Thanks for your use full job. I tried this indicator on a shorter timefram...
Nicolas You are welcome. I'm glad you like it.
Bolbo It does not appear over the price indicator on V11. Thanks in advance.
bearbull As per PhilipSchultz question above, has anybody managed to add code for when it turns blue,...
Ybr35 Bonjour Nicolas, lorsque je lance l'indicateur, il m'est indiqué que je dois définir les var...
Nicolas L'idéal est de télécharger le fichier itf joint sur cette page et de l'importer dans la plat...
Nicolas Merci dans ce cas d'ouvrir un sujet dans le forum ProScreener svp.
Andrea Hi Nicolas, thx for your code. Please i need your help to understand this part of your code:...
Nicolas the MA200 is ascending since 20 periods.
Regan2020 Hi, has anybody update the above code to enable on a 15m or 5m TF?
gigi64 ik heb de code op mijn pro realtime gezet , en bij indicator staat hij erbij maar komt niet ...
gigi64 I have put the code on my pro realtime, and it is on the indicator, but it does not appear o...
supertiti Thanks you so much Lucassen
dreif123 hi, copied the above code, not working on 10.3 the system says "return can only be used at ...
LUCASSEN Hallo , i have no problem , and i have the same versie 10.3, maybe you can ask Nicolas, tha...
Nicolas Rien, il faut l'appliquer sur la charte. Soit le mettre sur le graphique du prix, à l'aide d...
signorini Merci pour votre réponse. Je l'applique sur la charte, j'utilise la petite clé pour effacer ...
signorini Je vous remercie, Nicolas. C'est fixé. Très bon week-end.
Abz  hi , you need to add the indicator from the "price" menu in chart
Francesco Thank you Abz!
phanz Hi Nicolas, this is an interesting strategy. For long position, I assume entry when prices ...

Top