EMA 25/68 BIST30 Futures — Strategy by newton61

By newton61

Performance Metrics

Description

# EMA 25/68 BIST30 FuturesI developed this strategy to test a straightforward and easy-to-understand moving average system on the 15-minute chart of the BIST30 futures contract.The system monitors crossovers between EMA 25 and EMA 68. A crossover alone is not sufficient to open a position. For a long setup, the highest price of the crossover candle is recorded. For a short setup, the lowest price of the crossover candle is recorded. The signal is confirmed only if price breaks this level within the following four bars. If confirmation does not occur within four bars, the setup is cancelled.EMA 160 is used solely as a directional filter. Long positions are opened above EMA 160, while short positions are opened below EMA 160. The purpose of this filter is to avoid taking short- and medium-term moving average crossovers against the broader market trend.If a position has not been stopped out before the end of the session, it is closed at the close of the 17:45 bar, which corresponds to the 18:00 session price. A new position, including one in the opposite direction, cannot be opened on the same bar in which an existing position is closed.The strategy has been designed so that different parameter settings can be tested for educational and research purposes. Users can change the EMA lengths, the number of confirmation bars, the directional filter and the trailing stop percentage to examine how these variables affect the number of trades, win rate, profit factor and maximum drawdown.When evaluating parameter changes, users should not focus solely on the highest net profit. It is also important to examine whether neighbouring parameter values produce similar results and whether performance remains consistent across different market periods.The code avoids calculation methods that could introduce look-ahead bias. The entire entry bar is not treated as price movement that occurred after the position was opened. The trailing stop is calculated using data from a completed bar and becomes active no earlier than the following bar.Commission and tax on commission are displayed as separate settings. By default, the strategy assumes a commission rate of 0.020% per order leg and a 5% tax applied to the commission. Together, these produce an effective cost of 0.021% per order leg.If the commission or tax settings are changed, the effective cost per order leg displayed in the table at the top-right corner of the chart must also be entered under Strategy Settings → Properties → Commission.The strategy was developed for the XU030D1! symbol on a 15-minute chart. Similar results should not be expected on different markets or timeframes. The data source, continuous contract settings, commission, slippage and Bar Magnifier preferences may all affect backtest results.This strategy is shared for educational and research purposes only. Past performance does not guarantee similar results in the future and should not be used as the sole basis for making investment decisions.EMA 25/68 BİST30 VADELİBu stratejiyi BIST30 vadeli kontratın 15 dakikalık grafiğinde, mümkün olduğunca sade ve anlaşılır bir hareketli ortalama sistemi denemek için hazırladım.Sistem EMA 25 ile EMA 68’in kesişmesini takip ediyor. Kesişim tek başına işlem açmak için yeterli değil. Long tarafta cross mumunun en yüksek, short tarafta ise en düşük fiyatı kaydediliyor. Fiyatın bu seviyeyi sonraki dört bar içinde geçmesi halinde sinyal teyit edilmiş sayılıyor. Dört bar içinde teyit gelmezse aday iptal ediliyor.EMA 160 yalnızca yön filtresi olarak kullanılıyor. Long işlemler EMA 160’ın üzerinde, short işlemler EMA 160’ın altında açılıyor. Amaç, kısa ve orta vadeli ortalama kesişimlerini daha geniş trendin tersine kullanmamak.Pozisyon seans sonuna kadar stop olmadıysa 17:45 barının kapanışında, yani 18:00 seans fiyatında kapatılır. Pozisyonun kapandığı bar içinde ters yönde yeni pozisyon açılmaz.Strateji, eğitim ve araştırma amacıyla farklı parametrelerin sonuçlar üzerindeki etkisini incelemeye uygun olacak şekilde ayarlanabilir hazırlanmıştır. EMA uzunlukları, teyit barı sayısı, yön filtresi ve trailing stop oranı değiştirilerek işlem sayısı, kazanma oranı, kâr faktörü ve maksimum düşüş gibi ölçümlerin nasıl değiştiği karşılaştırılabilir. Parametreler değerlendirilirken yalnızca en yüksek net kâra odaklanmak yerine, komşu değerlerde de benzer sonuçların oluşup oluşmadığı ve farklı dönemlerde performansın korunup korunmadığı ayrıca incelenmelidir.Kodda geleceği görmeye yol açabilecek hesaplama seçenekleri kullanılmadı. Giriş barının tamamı, pozisyon açıldıktan sonra oluşmuş bir fiyat hareketi gibi kabul edilmez. Trail seviyesi tamamlanan barın verileriyle hesaplanır ve en erken sonraki barda çalışır.Komisyon ve komisyon vergisi ayarlarda ayrı ayrı gösterilir. Varsayılan olarak bacak başına yüzde 0,020 komisyon ve komisyon üzerinden yüzde 5 vergi kabul edilmiştir. Bu ikisinin efektif bacak maliyeti yüzde 0,021’dir. TradingView’in yerleşik komisyon alanı Pine kodunda dinamik bir inputa bağlanamadığı için bu değer değiştirildiğinde, Strateji Ayarları > Özellikler bölümündeki komisyon oranının da tabloda gösterilen efektif oranla aynı yapılması gerekir.Strateji XU030D1! üzerinde 15 dakikalık grafik için hazırlanmıştır. Farklı piyasalarda veya zaman aralıklarında aynı sonucu vermesi beklenmemelidir. Bar Magnifier kullanımı, veri kaynağı, sürekli vade ayarları, komisyon ve kayma tercihleri backtest sonuçlarını değiştirebilir.Bu çalışma eğitim ve araştırma amacıyla paylaşılmıştır. Geçmiş performans gelecekte aynı sonucun alınacağını göstermez ve tek başına yatırım kararı için kullanılmamalıdır.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView