Originally Posted by
kmlbs
İyi akşamlar arkadaşlar,
50 periyotluk hareketli ortalamanın 200 periyotluk hareketli ortalamayı aşağı kestiği bar da 200 periyotluk ortalamanın değerini grafik üzerinde yatay olarak çizmek istiyorum. Aşağıdaki kodu yazdım çalışmadı. Yardımcı olabilecek var mı acaba? Teşekkürler...
var V = Sistem.GrafikVerileri;
var C = Sistem.GrafikFiyatSec("Kapanis");
// hareketli ortalamaları hesapla
var MA1 = Sistem.MA(C, "Simple", 50);
var MA2 = Sistem.MA(C, "Simple", 200);
var KES = Sistem.Liste(0);
var Barno = 0;
for (int i = 1 ; i<Sistem.BarSayisi; i++)
{
if (Sistem.AsagiKestiyse(MA1, MA2))
Barno = i;
KES[i] = MA2[Barno];
}
Sistem.Cizgiler[0].Deger = KES; Sistem.Cizgiler[0].Aciklama = "YATAY";