Simple EMA Scalping Trading Strategy Backtest In Python (Part 1)

preview_player
Показать описание
Simple scalping Trading strategy using 3 exponential moving averages backtested in python, the scalping strategy is explained and the python code also in Jupyter notebook. The Python notebook is

🍓 If you want to follow structured courses with more details and practice exercises check my "About" page for Discount Coupons on my Udemy courses covering: Python basics, Object Oriented Programming and Data Analysis with NumPy and Pandas, ... more courses are on the way drop me a message if you have a particular interesting topic! Good luck!

available for download from the link:

#TradingBot #PythonCoding #forexanalysis

00:00 Scalping Strategy Introduction
02:24 Python Code For Algorithmic Strategy
11:53 Backtesting The Scalping Strategy
13:02 Scalping Backtest Results
Рекомендации по теме
Комментарии
Автор

Really good job!! It is my favourite channel about AlgoTrading :-)

krzysztofkubiak
Автор

Going on a binge of you channel. Absolutely love the videos.

I use IC Markets for my broker and cTrader as my platform but even though cTrader is in C#, I use Python for researching. I'm going to work on translating the code to C# and testing it there as soon as I can.

I really appreciate the time you put in. You deserve a lot more than 2.6k subscribers.

ClearVista
Автор

Hi, some ideas, which maybe can be used in an update … Hull moving average (faster/more responsive), choppyness as filter, and two ways of muliple timeframe: a) trend from 1hour as filter combined with entry/exit on 15 min, and b) the 1 hour trend based on 15min data with Rolling 1h dataframe updated every 15 minute, ie the 1h trend dataframe is ‘shifted’ every 15m ? …… THX for great videos and code👍👌🙌

jensasp
Автор

great sir. will be waiting for its optimized version with a flexible return.

souvikdey
Автор

can you help me complete a bot in python for iq option?
Based on EMA20, the bot will open an order if it is trending at minutes: 00, 15, 30 and 45; expiration in 5 min.

And to make it more assertive, I would open the order if it was in a strong trend using other trend functions with tredingview or investing. the trend thermometer. and the cycle function for recovering a possible loss.

By your videos, you are an excellent programmer. I await your reply. thanks in advance.God bless you.

thyagolukas
Автор

I think in your code these numpy conditions

conditions = [
((df['EMA50'] < df['EMA100']) & (df['EMA100'] < df['EMA150']) & (df['slopeEMA50'] < 0) & (df['slopeEMA100'] < 0) & (df['slopeEMA150'] < 0)),
((df['EMA50'] > df['EMA100']) & (df['EMA100'] > df['EMA150']) & (df['slopeEMA50'] > 0) & (df['slopeEMA100'] > 0) & (df['slopeEMA150'] > 0))
]

The first condition should represent the bearish signal and second condition should represent the bullish signal right ?
Because short term EMA < medium term EMA which is less that long term EMA, also slopes are negative means that is a downtrend.

SPARSHKUMAR-fh
Автор

Excellent. Please learning api conncet bybit for sell and buy

mohakaz
Автор

what is this software where you write your code ?

Max-yzdg
Автор

I am getting an error on line 2 df= pd.read_csv... which reads: in wrapper(*args, **kwargs)

garychan