Adaptive Zero Lag EMA v2

This is my most successful strategy to date! Please enjoy and join the Open Source movement by sharing your code and ideas online!

The strategy is based on Ehlers idea that any indicator can be turned into a signal-producing trade system through smoothing and other filtering processes.
In fact, I'm using his Zero Lag EMA ( ZLEMA ) as a baseline indicator as well as some code snippets he has made public (1). God bless open source!
Next, I've provided the option to use an Instantaneous Frequency Measurement (IFM) method, which will adaptively choose the best period for the ZLEMA (2)
I've written other studies that use the differential calculus approximations for IFM, so it was only natural to include them in this strategy.
The primary two are Cosine IFM (3) and In-phase Quadrature IFM (4). You can also find an indicator with both plotted and the ability to average them together, as one IFM prefers long periods and the other short. (5)

1. This strategy only runs on "normal" FX pairs ( EURUSD , GBPJPY , AUDUSD ...) and will fail on Metals or Commodities .
Cryptos are largely untested.
2. Please run it on these time frames: M15 to D.
Anything outside this range will likely fail.

1. If the Default settings don't produce good results right off the bat, then lower gain limit to 1 or 2 and threshold to 0.01.
2. Test each setting under adaptive method. If you want to leave it Off, then I'd recommend using some kind of IFM (see my links below) to
discover the most efficient period to use.
3. Once you have the best adaptive method chosen, begin incrementing gain limit until you find a nice balance between profit factor ( PF ) and drawdown.
4. Now, begin incrementing threshold. The goal is to have PF above 2 and a drawdown as low as possible.
5. Finally, change the source! Typically, close is the best option, but I have run into cases where high
yielded the highest returns and win rate.
6. Sit back, relax, and tweak the risk until you're happy with the return and drawdown amounts.

You may need to adjust take profit (TP) points and stop loss (SL) points to create the best entry possible. Don't be greedy! You'll likely have poor
results if the TP is set to 300 and SL is 50.
If you are trading a pair that has a long Dominant Cycle Period, then you may increase Max Period to allow the IFM
to accept longer periods. Any period above the Max Period will be rejected. This may increase lag time!

Cheers and good luck trading!

PS - This code doesn't repaint or have future-leak, which was present in Pinescript v2.
PPS - Believe me! These returns are typical! Sometimes you must push aside the "if it's too good to be true..." mindset that society has ingrained in you.
Do you really believe the most successful pass up opportunities before investigating them? ;)

(1)Ehlers & Ric Zero Lag EMA
(2)Measuring Cycles by Ehlers
(3)Cosine IFM
(4)Inphase Quadrature IFM
(5)Averaging IFM
Feb 08
發布通知: Now with Cryptocurrencies, Metal Spots, and Custom trade settings!
-> You're able to set a custom # of contracts to trade if required.
-> Simply set the Security Type to Custom!

Better Default settings!

Please note, if SL Points is less than your slippage, trades will exit immediately.
I encourage you to make testing conditions realistic & make sure SL points is greater than slippage!
Feb 08
發布通知: Now able to set the max allowed lot size!
Many brokers set a hard limit at 100 Standard lots per trade for currency pairs and 30 standard lots for cryptocurrency pairs.
從收藏腳本中移除 新增至收藏腳本
baali1994 kirillkiselev82
@kirillkiselev82, this strategy repaints?
EmpiricalFX kirillkiselev82
@kirillkiselev82, I appreciate your concern, but I don't make any security() calls. AFAIK, this is the only form of future-leak in Trading View.
Also, my code is 100% farm-fresh, certified organic open source. This means you're free to run, modify, and test it yourself. If you have evidence of future-leak - please let me know and I'll fix the bug.
Can this strategy be automated?
thunderbluex thunderbluex
@thunderbluex, sorry, that was a stupid question. Please ignore it.
EmpiricalFX thunderbluex
@thunderbluex, Not stupid at all! If you're looking to have your own indicator, PM me as I provide freelance services
nivasdhina EmpiricalFX
@EmpiricalFX, Iam in need of your freelancing service how to get in touch with you.
Hey need some help, when applying this indicator with BTC pairs with less than 1000 sats the system seems to go haywire. Could you suggest how to factor that in the code?
EmpiricalFX crypto_hd_1
@crypto_hd_1, I wrote this script with FX pairs in mind, which are typically x1000 smaller than cryptos. I kind of patched it by adding the "Cryptocurrency" option, but it doesn't cover all cases. Try changing the Custom # of contracts to less than 1 (0.1, 0.03, etc...). Without knowing exactly what you are looking at, all I can suggest is playing around with the settings. Cheers :)
crypto_hd_1 EmpiricalFX

Thats what I noticed, I think the issue is more about decimals.

Fx I believe has up to 4 dec, where as Cryto has 8 dec. whenever an asset price is lesser 1/1000'th value the system goes haywire. From your experience with this strategy, whats the optimal indication of a reversal?

首頁 股票篩選器 外匯篩選器 加密貨幣篩選器 全球財經日曆 如何運作 圖表功能 價格 推薦朋友 網站規則 幫助中心 網站 & 經紀商解決方案 小工具 圖表解決方案 輕量圖表庫 部落格 & 新聞 推特
概覽 個人資料設定 賬戶和賬單 推薦朋友 我的客服工單 幫助中心 發表的想法 粉絲 正在關注 私人訊息 在線聊天 登出