Intelligent Moving Average

For 4 simple moving averages, the script tests every single combination for maximum profitability and finds the best pair.

sma1 and sma2,
sma1 and sma3,
sma1 and sma4,
sma2 and sma3,
sma2 and sma4,
sma3 and sma4

And then paint the pair which get best performance. sma lengths are optional, so you can change lengths as you wish.

You will see in some charts that for example sma1 and sma2 pair was best perfrmance and colored on the chart but then sma2 and sma3 pair got better performance, so script starts to paint sma2 and sma3. so it's dynamic based on best performance.

keep in mind => length1 < length2 < length3 < length4 will be better

I didn't have enough time to test the script, so please comment when you test it.

by LonesomeTheBlue
Favori Komutlardan Çıkart Favori Komutlara Ekle
If you find my works useful, please consider a donation
BTC: 19qDW9AShZhBZsGuXcgRzam5Fbpc3EU8EV
ETH: 0x39c8552371b9b7f4e324197af460ba8bc8e18ef9


Rushed here as quick as I could when someone told me that you had published an intelligent moving average. Incredible work my friend, truly amazing.

Do you think it would be possible for you to cook up an iteration that takes two moving averages and then loops through every combination of lengths (between, say, 3 - 50 or something similar) to see what is the most profitable? I assume the logic would be similar to what you're doing here, but I'm not too sure.

Either way, well done, you're a gift
+2 Cevap Gönder
LonesomeTheBlue chrysopoetics
@chrysopoetics, thank you for the comment. yes it's possible and it's my plan but in current pine version v3 there isn't Array definition and this means it's a lot of codding. as I know pine v4 will be released in this year. I will definitely work on this. on the other hand as I know some developers already did this and selling. If I have enough time I will work on it and I plan to share it free of charge.
+1 Cevap Gönder
chrysopoetics LonesomeTheBlue
@LonesomeTheBlue, you’re an absolute gentleman. I would have imagined it would have taken quite a lot of coding, but you’ve done a great job with this, so if there’s any man for the job, who better than you?

So out of curiosity, if I was to extend your logic from this script, it should work for the idea you have, right? I might try my hand at it (don’t think I’ll get half the distance you did) and send on to you whatever I come up with.

But yeah, I’ve noticed this is a profitable idea and I’ve been waiting for a knight in open-source armor to come and liberate us all.
Cevap Gönder
LonesomeTheBlue chrysopoetics
@chrysopoetics, it will give an idea about moving average really works or not, I believe it works (at least as sentiment, traders psychology) and we can see the best one. very good to hear you gonna work on this. please do not hesitate to send me message while you are working on extended version.
+1 Cevap Gönder
chrysopoetics LonesomeTheBlue
@LonesomeTheBlue, I agree, I think MAs can be used to great effect when treated with respect and applied with stellar risk management. I have a relatively large script for studying different types of MAs. It's pretty rudimentary at the moment, but when I release it I'll get to updating it every week, so eventually it'll be clean.

I'll definitely pass on any revelations to you, but don't hold your breath, I don't know how well I'll do. You're leading the charge at the moment.
+1 Cevap Gönder
GrantPeace chrysopoetics
Not original work unfortunately. Looks like a failed intention to copy
Cevap Gönder
@GrantPeace, first of all thanks for the comment and what you have done is good work. as a computer science & engineer I must comment; there is no intelligent moving average in TV and with pine it looks not possible to develope such things here. all of them are just parameter optimization at all. machine learning is far away than parameter optimization. here I just wrote this script and share the code to show how parameter optimization could be done with pine. thank you
+2 Cevap Gönder
yop127 GrantPeace
@GrantPeace, Is this a joke? Anybody can try to do a moving average optimization. There is no intellectual property here, and he is not making any money out of this.
+2 Cevap Gönder
LOVE this! Thanks!
Cevap Gönder
This script is proof of that its only parameter optimization. there is no machine learning or AI in it at all and machine learning is not possible in this platform. The code is already shared and you can see it for yourself..
Cevap Gönder
Ana Sayfa Hisse Senedi Takipçisi Forex Takipçisi Kripto Takipçisi Ekonomik Takvim Nasıl Çalışır Grafik Özellikleri Ücretlendirme Tanıdık yönlendirme Kurallarımız Destek Merkezi Web Sitesi & Aracı Kurum Çözümleri Görsel Bileşenler(Widget) Grafik Çözümleri Hafif Grafik Kitaplığı Blog ve Haberler Twitter
Profil Profil Ayarları Hesap ve Ödemeler Tavsiye edilen arkadaşlar Koinler Destek Kayıtlarım Destek Merkezi Yayınlanmış Fikirler Takip Edenler Takip ediliyor Özel Mesajlar Sohbet Çıkış