Volume Supertrend AI

Volume Supertrend AI

Overview of the Volume SuperTrend AI Indicator

The Volume SuperTrend AI Indicator is a cutting-edge technical tool designed for forecasting price movement trends by integrating traditional SuperTrend calculations with artificial intelligence techniques, notably the k-nearest neighbors (KNN) algorithm. Its purpose is to arm traders with a more accurate means of discerning market trends, combining volume-weighted moving averages (VWMA) and the KNN algorithm to deliver both bullish and bearish signals.

How It Works

– Volume Analysis:

Leveraging volume-weighted moving averages (VWMA), the Volume SuperTrend AI underscores the significance of trading volume in determining trend direction. This enables a more precise reaction to market dynamics.

– Artificial Intelligence Integration – k-Nearest Neighbors (k-NN) Algorithm:

The k-NN algorithm is utilized to intelligently assess historical data points by comparing current parameters with past data. The nearest neighbors are used to generate predictive modeling, thus adapting to complex market patterns.

Usage Guide

– Trend Identification:

The indicator evaluates not just price movements but also trading volume, adding an additional layer to trend analysis. A green line below the price usually indicates an uptrend, reflecting bullish market sentiment, whereas a red line above the price denotes a downtrend, indicative of bearish conditions.

– Trend Continuation Signals:

The AI algorithm plays a critical role in determining the coloration of the Volume SuperTrend, facilitating trend prediction while retaining the fundamental attributes of the traditional SuperTrend.

– Dynamic Trailing Stop:

The Volume SuperTrend AI indicator acts as a dynamic trailing stop loss, adjusting to both price movement and trading volume. This method safeguards profits while allowing the trade to develop, incorporating volume for a more nuanced response to market shifts.

Settings

– AI Settings:

These include adjustments for the number of nearest neighbors to consider in the k-Nearest Neighbors (k-NN) algorithm and the amount of data points to analyze. These settings influence the model’s sensitivity to market fluctuations.

– AI Trend Settings:

This allows for the customization of the lengths of the weighted moving averages used for calculating both the price trend and the prediction trend. It includes options to enable or disable AI-generated trend signals.

– SuperTrend Settings:

These settings adjust the length of the SuperTrend and the factor, which is the multiplier for the Average True Range (ATR) in the SuperTrend calculation, as well as selecting the type of moving average for the SuperTrend calculation. This customization aligns with individual trading strategies and market conditions.

This comprehensive approach to market trend prediction merges traditional technical analysis with artificial intelligence innovations, offering traders a robust tool for decision-making in their trading activities.

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. Gaspare • 03/04/2024 #

    Grazie Ivan
    una domanda:
    quale TF ci puoi suggerire per operare sugli indici americani CFD?

  2. Iván • 03/04/2024 #

    I personally like it in daily timeframe

  3. oliTR • 03/04/2024 #

    Many thanks Ivan,
    I copy/paste your code to try it but could only get a constant stable uniform value for the SuperTrend.
    Is anything missing in the code?
    I think the problem is coming from “vwma = average[len,maSrc](close*volume)/average[len,maSrc](volume)”
    What did you intend to write here?
    Also, what is the use of “myindex = $indices[i]”?

    • Iván • 03/04/2024 #

      Hi,
      I’ve copied the code above and it works… what asset are you trying?
      $indices array use is to be complemented with $distance array. Currently not used in the code, but if you want to know an especific $distance it could be useful.
      If you want you can delete it.

  4. Hasardeur • 76 days ago #

    Hallo Ivan,
    are you shure that line 107 “myindex = $indices[i]” myindex is correct?

  5. oliTR • 46 days ago #

    Dear Iván,
    I am trying to set this indicator in a trading system.
    However, I have some issue at the end of the first part, when your indicator evaluates ‘mysupertrend’ before collecting data points.
    If used as an indicator then it returns a proper ‘mysupertrend’ signal, but when used in a code then it does not give any value. What could be the reason for that?

    // ~~ Calculate the SuperTrend based on the user’s choice
    vwma = average[len,maSrc](close*volume)/average[len,maSrc](volume)
    atr = averagetruerange[len](close)

    upperband = vwma + factor*atr
    lowerband = vwma – factor*atr

    if barindex < len then
    upperband = close
    lowerband = close
    direction = 1
    else
    //Redefine upperband
    if upperband < upperband[1] or close[1] > upperband[1] then
    upperband = upperband
    else
    upperband = upperband[1]
    endif
    //Redefine lowerband
    if lowerband > lowerband[1] or close[1] < lowerband[1] then
    lowerdband = lowerband
    else
    lowerband = lowerband[1]
    endif
    //Define Supertrend
    prevSupertrend = mysuperTrend[1]
    if prevSupertrend = upperband[1] then
    if close > upperband then
    direction = -1
    else
    direction = 1
    endif
    else
    if close < lowerband then
    direction = 1
    else
    direction = -1
    endif
    endif
    endif

    if direction = -1 then
    mysupertrend = lowerband
    else
    mysupertrend = upperband
    endif

    • Iván • 46 days ago #

      Hi. It works… just delete drawing lines and place buy and sell conditions.
      For example, if you want to enter long/short when the arrow appears:
      if Trendup then
      //drawtext(“▲”,barindex,currentsuperTrend)coloured(r,g,b)
      buy 1 contract at market
      elsif Trenddn then
      //drawtext(“▼”,barindex,currentsuperTrend)coloured(r,g,b)
      sellshort 1 contract at market
      endif
      graphonprice currentsuperTrend as “SuperTrend” coloured(r,g,b)

  6. oliTR • 46 days ago #

    Yes, I am sure it should work perfectly, but I found very strange vehavior like this one:

    If I set these lines right after the code:

    if g=250 then
    test=1
    elsif r=250 then
    test=-1
    else
    test=0
    endif
    graph test

    and then there is non matching between the colors of the indicator and what the code gives.

    Would you see something similar?

    (sorry but I can’t find how to attach a picture)

  7. oliTR • 45 days ago #

    well,
    it seems that the issue came from my backTest period which was not long enough.
    sorry

  8. oliTR • 35 days ago #

    Dear Ivan,
    why, in line 86, there is “currentsuperTrend[i]” and not “currentsuperTrend” only?

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
mmoren44 no esta el color azul (Fade //Blue), No aparece en las barras el color azul.
larouedegann changer fade coloured (0,0,255)
Nicolas 1. yes 2. maybe yes?! 3. why not?
patapouf Bonjour Nicolas. Je viens de découvrir cet indicateur, que je trouve bien intéressant Mais...
Nicolas Tu peux modifier le paramètre "scalefactor" pour adapter la hauteur des barres à ton graphiq...
bolsatrilera EM MONEY FLOW INDEX + ALERTS //@version=3 // on platform Tradingview by DreamsDefined //a...
Carlos Garcia Enorme. Gracias!
Andraxx Buen indicador.... Gracias
TAC Bolsa All indicators share some code of other TAC indicators that improve the functioning of this ...
ramonjp Hi Tac, Great job. Please, can you provide latest code version of this indicator without ...
Tze Khai Lim Hi Tac, pls provide latest code version of this indicator. Thanks in advance.
TAC Bolsa Estas equivocado al 99,9%. La correlación entre las series de precios y volúmenes las des...
Domenec Si hablas de un indice regional como el Ibex es posible que sea asi yo nunca lo he operado y...
TAC Bolsa Regional de Mostoles, en una cosa tienes razón mejor dejarlo aquí...
Xusto Hello, Fully Agree, I will update it with your advice. Btw Can would you like share you co...
Niklas johansson hägglund do you now if it's possible to use this strategy with this code in tradingview also?
Alexander9 This code for metastock ?, can for amibroker . Thanks
TACBOLSA
7 years ago
luxrun Thank you so much Tac BOLSA, I can not post the picture tonight I'll try tomorrow. I loaded ...
TAC Bolsa A new version of TAC Volume HPI DIV10.4 is available. that marks the divergence In the fo...
Raymundo Buenas tardes. Como puedo descargar algunos indicadores de esta pagina ?
mangiaragni Buongiorno io non riesco a visualizzare nessun tipo di volume , mi torna sempre una linea dr...
Nicolas Assicurati che lo strumento che stai guardando abbia dei volumi! È il caso?
Geronima Ortiz I watched the video three times, but I can not put the npips parameter as a variable. I do...
Geronima Ortiz I think the video is for an old version of prorealtime, the images do not correspond at all ...
Nicolas indicator1 = CALL “PRC_StopReversal”[npips, 1] and define npips in the optimization window ...
Caribeengeek Bonjour j’avais vu que vous proposiez d’écrire des codes pour ceux qui s’y connaisse pas Mai...
Caribeengeek Les devises unité
Nicolas Merci d'utiliser le forum pour les demandes de programmation personnalisée
Carlos Garcia If price tags the lower BBand, look for IIIX has positive values to enter a trade. Converse...
Thally Thanks for the quick response Nicholas. Would you have any idea how to resolve. Manually ref...
Thally Do you think adjusting the below code might help? newperiod = minuteminute[1] if newperi...
Nicolas There is no "second" instruction.
YvesRobert Merci beaucoup Nicolas. Existe t'il un petit programme qui permet de tracer sur la graphe en...
Nicolas Oui il y a celui ci: https://market.prorealcode.com/product/prt-renko/?lang=fr
YvesRobert Bonjour Nicolas, j'ai une question technique à te poser. Je visualise souvent le cours en RE...
GenesisEX Thank you all for your contributions this is a great submission. Thanks for your inputs.
tino Bonjour nicolas. Je ne parviens pas à recopier le screener de l'indicateur. Auriez vous la g...
Nicolas Quel screener svp? C'est dans un des sujets du forum? Merci de fournir le lien.
gabri Ha ragione in computer, ho sbagliato io BullAD = summation[period](ADvolbull*((Close-Low) –...
marcov66 Perfetto! Funziona. Grazie di tutto!
SkrHugo Bonjour, J'essaye d'utiliser le script avec le graphique renko mais sa ne marche pas, quelq...
Tonicejudo Hola Nicolas, a ver si me puedes ayudar. Hay un indicador que se llama volumen stop de bolsa...
Nicolas Utilice los foros para hacer preguntas no relacionadas con la página actual ...
verdi55 You can find me at www.FXautomate.com Ahh. So i got it ? 4 different supertrends without th...
juanj What? This has nothing to do with the website. The site is simply a service to help people ...
Nicolas Advertising is allowed,as long as people are helping others and if provided services are abo...
jebus89 Big thanks for sharing this :) Seems to work as expected, good stuff.
xpe74 Top visually, and very efficient. I would like to integrate it as a value in a small algo i...

Top