Hi,
I'd like to share my Forex trading strategy with triple EMA, which I'm currently using for live trading.
Feel free to use, experiment with and share your critics and suggestions.
There are several places within "Algoritm Paramaters" you can experiment with:
- fx_galaxy (currency-pairs collections, see selectGalaxy()-Method in ForexGalaxyBay.py for details)
- leverage
- take_profit_pips
- stop_loss_pips
- ema_red (slow EMA-period)
- ema_blue (mid EMA-period)
- ema_green (fast EMA-period)
- period_min (trading period in minutes)
Have a lot of fun!
Mykola
Valery T
Hi Mykola,
It seems that your algo does not perform so well in 2019.
Are you trading with real money?
Mykola Dobrochynskyy
Hi,
here is the brief description of the algorithm's modules:
, OnData() event handler etc.
Mykola Dobrochynskyy
Hi,
in the screenshot below you can see how you could use an existing or construct a new currency pairs collection and set it then as "fx_galaxy" algoritm parameter
Mykola Dobrochynskyy
Screenshot Forex-Pairs Collection
Mykola Dobrochynskyy
as far as the "leverage" parameter is concerned, I wouldn't recommend to set it bigger than 10. Otherwise the risk and drawdown would be too big.
Mykola Dobrochynskyy
Hi,
as you could see from the last backtest reducing portfolio to 3 pairs ("EURUSD": .5, ,"GBPUSD": .3, "AUDUSD": .2) increased profit by 17%.
Now we change "touch_pip_tolerance"-parameter from -3 to -5 and make further 11% more and will get 100% net profit for the backtest starting from 2020-1-1
Mykola Dobrochynskyy
Hi Valery,
you wrote:
> It seems that your algo does not perform so well in 2019. Are you trading with real money?
Yes, I do since Dez. 2020
It was always a big question to find a strategy with good chance/risk relation. A strategy will always have its winning and losing periods. The trick is to catch the winning wings an make a profitable exit within given strategy live period, havig reasonable risk management (i.e. leverage = 1 to 10 and stop_loss_pips = -30 to -50)
Regards,
Mykola
Mykola Dobrochynskyy
playing around with algo params even further - setting
- take_profit_pips = 60 and
- stop_loss_pips = -40
will give us another 14% increasing net profit to 114% (for the backtest starting from 2020-1-1 )Mykola Dobrochynskyy
Hi,
here is my live trading setup:
Mykola Dobrochynskyy
... and few words about logging.
LOG: : 2021-04-12 05:44:28.054417 - ------------------------------------
LOG: : 2021-04-12 05:44:28.054417 - ENVIRONMENT:
LOG: : 2021-04-12 05:44:28.054417 - ------------------------------------
LOG: : 2021-04-12 05:44:28.054417 - Algorithm:FxMltTrdnt.EMA70.30.10.A5E.8HL3
LOG: : 2021-04-12 05:44:28.054417 - start_date=2020-1-1
LOG: : 2021-04-12 05:44:28.054417 - end_date=
LOG: : 2021-04-12 05:44:28.054417 - fx_broker=OANDA
LOG: : 2021-04-12 05:44:28.054417 - fx_galaxy=AgileFiveEqual
LOG: : 2021-04-12 05:44:28.054417 - ema_red=70
LOG: : 2021-04-12 05:44:28.054417 - ema_blue=30
LOG: : 2021-04-12 05:44:28.054417 - ema_green=10
LOG: : 2021-04-12 05:44:28.054417 - leverage=3
LOG: : 2021-04-12 05:44:28.054417 - galaxy_type=0
LOG: : 2021-04-12 05:44:28.054417 - scalp_period=480
LOG: : 2021-04-12 05:44:28.054417 - take_profit_pips=60
LOG: : 2021-04-12 05:44:28.054417 - stop_loss_pips=-40
LOG: : 2021-04-12 05:44:28.054417 - touch_pip_tolerance=-3.0
LOG: : 2021-04-12 05:44:28.054417 - equal_pip_tolerance=-3.0
- and so could look a trading log (i.e. GBPUSD long-trade)...
DEBUG: : 2021-04-07 13:13:00.067464 -DEBUG: : 2021-04-07 13:13:00.067464 - -------------------------------------------
DEBUG: : 2021-04-07 13:13:00.067464 - Ticker: GBPUSD
DEBUG: : 2021-04-07 13:13:00.067464 - -------------------------------------------
DEBUG: : 2021-04-07 13:13:00.067464 - GO LONG! Open-Price= 1.374015
DEBUG: : 2021-04-07 13:13:00.067464 - EMA_RED=1.375408967329811
DEBUG: : 2021-04-07 13:13:00.067464 - EMA_BLUE=1.3746509873865485
DEBUG: : 2021-04-07 13:13:00.067464 - EMA_GREEN=1.37428309470445
DEBUG: : 2021-04-07 13:13:00.067464 -
...
DEBUG: : 2021-04-08 21:12:00.070625 - -------------------------------------------
DEBUG: : 2021-04-08 21:12:00.070625 - Ticker: GBPUSD
DEBUG: : 2021-04-08 21:12:00.070625 - -------------------------------------------
DEBUG: : 2021-04-08 21:12:00.070625 - LONG CLOSE! Reason: is_long_ema_close. Close-Price= 1.37477
DEBUG: : 2021-04-08 21:12:00.070625 - EMA_RED=1.3742278644511277
DEBUG: : 2021-04-08 21:12:00.070625 - EMA_BLUE=1.3746214412826328
DEBUG: : 2021-04-08 21:12:00.070625 - EMA_GREEN=1.3748792239571543
DEBUG: : 2021-04-08 21:12:00.070625 - Trade PIPs Profit=8 (PIP-profit of the current GBPUSD trade)
DEBUG: : 2021-04-08 21:12:00.070625 - Lifetime Profit=66 (PIP-profit of the all GBPUSD trades)
DEBUG: : 2021-04-08 21:12:00.070625 - Global Lifetime Profit=405 (PIP-profit of the all algo trades)
DEBUG: : 2021-04-08 21:12:00.070625 -
Mykola Dobrochynskyy
Does anybody live/paper trading with this strategy? If yes, I'd be happy to hear your feedback
Derek Melchin
Hi Mykola,
Thanks for sharing this interesting strategy with the community. When continuing the development of this algorithm, consider adding a manual warm-up for the EMA indicators so they are ready when the algorithm starts.
Best,
Derek Melchin
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Mykola Dobrochynskyy
Hi Derek,
Thanks for suggestion. A manual warm-up has alredy been done in the base-class:
class FxTridentBase(QCAlgorithm):
def Initialize(self):
. . . .
self.SetWarmUp(timedelta(15))
Best,
Mykola
Mykola Dobrochynskyy
Live Trading screenshot for current week (since 2021-04-21) :
Soroosh B
Hey glad to see you've implemented the strategy on a live account!!
How is it going?
Mykola Dobrochynskyy
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!