TradingView
RicardoSantos
28 de Jun de 2021 11:42

Function - Sorted Indices 

Bitcoin / U.S. dollarBitstamp

Descrição

function to get sorted indices from a array using bubble sort.

Notas de Lançamento

previous version was bugged, its fixed now 🤭
Comentários
RozaniGhani-RG
Awesome.
I saw potential in this code, I will using a lot in table, probably with array.new_table.
Thank you.
PineCoders
PineCoders
This publication is now featured in our Editors' Picks: tradingview.com/scripts/editors-picks/ .
In the name of all TradingViewers, thank you for your valuable contribution to the community, and congrats!
NightCommando
Thanks for this contribution.
How would you set buy conditions depending on how the MAs are sorted?
For example:
sort condition #1, buy below ma5
sort condition #2, buy below ma3
sort condition #3, sell above ma2
Thanks for any help.
berkusacoin
thanks , ma1=sma(close,50) ma2=(close.200) etc ... that giving error also...how we can sort in cells ??
Mais