please generate a sophisticated python 3.12 trading bot that uses the metatrader5 python library from this transcript: Introduction 
in this video I'm going to show you a 
way of trading without the use of any 
technical indicators and the particular 
strategy which I'm going to show you 
identifies reversal points in euro 
dollar and can achieve a win rate or of 
an accuracy of almost 
90% so if you've almost given up trying 
to use indicators to get some sort of 
consistency in your trading then this 
video could be of interest to you I'm 
going to show you a back test report for 
the strategy which runs back to January 
2010 so at the time of filming that's 
almost 14 and 1 half years of data so 
it's been working for quite some time 
now and since discovering the strategy a 
few years ago I've also been using a 
variation of it in my own trading the 
The Strategy 
strategy uses a few simple rules for the 
entries and the exits now the idea of me 
showing you this video or showing you 
this strategy is to just to demonstrate 
that you don't have to over complicate 
things in order to find an edge or a 
longterm Edge in any particular Market 
I've prepared a quick slideshow which 
we're going to look at in a minute which 
EXP explains exactly how to get in and 
out of the trades then we'll have a look 
at the performance report now I've split 
the back test and the performance report 
into two sections the bulk of it is 
going to go from January 2010 through to 
January 2022 so we've got that first 12 
years and then I've left the last two 
and a half years as the most recent data 
because I think that's where you're 
going to be most interested in the 
recent performance so from 2022 through 
to the present day which is in June 2024 
that's the second set of data which 
we're going to look at so let's go and 
have a look at that slideshow and show 
you exactly how things work the strategy 
Long Entries 
works on the daily chart of euro dollar 
let's look at the long trade entries 
first so the number one rule we must be 
flat we must have no open trades so if 
we're already short we're going to wait 
for our trade exit from our short 
position before we can actually go long 
okay so we need to be flat we look at 
that on the charts number two wait for a 
red candle so why we see a red candle 
and the close of that red bar is less 
than yesterday's low that's our next 
setup and then number three once we see 
that set up we enter a buy stop order at 
the high of that red candle and it's 
only valid for one day that means if for 
the next session if the high is broken 
then we get into the trade if the high 
of that red candle isn't broken within 
that session then we cancel the order 
and we look for a new trade alog 
together looking at the short it's 
Short Entries 
pretty much the opposite as you might 
expect number one again we must be flat 
no open trades and we're waiting for a 
green candle now and the close has to be 
higher than yesterday's high when we see 
that we want a sell Short Stop order at 
the low of that green candle and again 
it's only valid for that next candle 
that next bar or that next session okay 
if we're not in a trade within that next 
session we cancel the order trade exits 
Exits 
uh basically we exiting at the end of 
the session if we're in profit this is 
our good old bailout exit I like to use 
1645 to 1655 Eastern Standard Time so 
between 5 and 15 minutes before the end 
of the session check whether we're in 
profit and this may be within the same 
day that we've entered the trade if 
we're in profit then we're going to exit 
if we're not in profit we leave the 
trade running and the other exit is a 
stop loss of 250 Pips so we're only 
going to get out of trade one of two 
ways we're going to exit into profit or 
we're going to hit our stop loss very 
very simple looking at some long trade 
Examples 
examples here looking at the first 
example so this first bar here we can 
see that we've got a red bar and the 
close is less than yesterday's low so 
what we would have done we would have 
put a stop order to buy at the high of 
this bar 
here and you can see the next bar that 
high wasn't BR so we didn't get into a 
trade but this was another setup so we 
would have put the stop order at the 
high of this bar but we can see again 
the high wasn't broken so we canceled 
the order but we got another setup and 
finally the day after we saw this we did 
get an entry here I don't know if you 
can see that whereabouts my arrow is 
that's where the trade entered as we 
broke the high of this red bar and then 
the close of this bar was slightly less 
so we weren't in profit but the next day 
we saw that the close was up here into 
profit and we exited the trade similar 
sort of scenario here it wasn't until we 
got here that the high of the the 
previous Red Bar was actually broken and 
we got in the trade here and then again 
after that next session we took some 
profit similar scenario here and again 
one day later we took some profit again 
here we got another long example and 
here we got some short examples so green 
bar here the close was higher than 
yesterday's high so we would have put a 
sell short order at the low of this bar 
and obviously that wasn't broken but we 
got another setup so we put a sell Short 
Stop order at the low of this green bar 
which was broken the day after and then 
one day later around about the close we 
were in profit so we exited the trade 
for some profit and another the trade 
here this one took us 1 2 3 4 5 days 
until we actually saw some profit and 
then we exited the trade in the report 
I've actually included some trading 
costs I've actually included $40 worth 
of costs and we're trading 100,000 units 
or one full lot so $40 of cost that's 
equivalent to four Pips worth of costs 
so let's have a look at the back test 
data for that first and largest chunk of 
data from 2010 through to 
2022 here in multi charts you can see 
Backtest 
that we've got two separate charts and 
they're just different date ranges so 
the first date range is the 2010 through 
to 
2022 and if I just enlarge that we can 
see some of the Trad which have been 
taken on the chart is the last five 
trades so let's look at the performance 
report net profit we can see it's making 
24,000 600 over that 12E 
period that's what the equity curve 
looks like 
it's had some really good periods some 
fairly flattish periods and then some 
slightly better periods but overall 
definitely moving in the right direction 
it's taken 212 trades with a win rate of 
88% average trade of 
$116 as after costs and that's 
equivalent to 11.6 Pips see our largest 
losing trade there 2 and a half th000 or 
just over 2 and a half th000 our stop 
loss is actually $25,000 that's our 250 
pip stop loss plus the 40 which is our 
four Pips of trading costs so that's our 
largest losing trade so it's nice to see 
that there is some consistency and we 
are definitely moving in the right 
direction over that first 12year period 
for such a simple trading strategy the 
performance over that 12E period is okay 
isn't it the good news is though for the 
next set of data which is the most 
recent data the performance has got even 
better 
I'll show you that in just a moment but 
firstly I want to offer you a PDF guide 
book which I've created in the guide 
book I call it the 22 page beat the 
Marcus strategy guide book in there I 
outline in detail three more trading 
strategies which are rule based a little 
bit like the one which we're looking at 
today if you're interested in that I'll 
leave the links down below because at 
the moment you can get that absolutely 
free and for those of you who are 
looking for even more strategies I've 
included another six strategies in my 
popular trading course and interestingly 
in the course I actually include a 
strategy which is a little bit similar 
to one we're looking at today however in 
this time I've included like a clever 
trade filter which improves the 
performance even more so if you're 
interested in that I'll also leave the 
links down below of course it's not just 
strategies in the course there's also a 
ton more information it's all about how 
to make consistent profits using 
rule-based trading now let's go and have 
a look at the up-to-date or the most 
recent performance for this strategy 
Performance 
we've already seen the earlier 
performance report for this early day 
dat but let's look 
at this one which is got data from 2022 
through to the 21st of June 
2024 not quite the 21st actually it's 
the 14th of June 
2024 net profit 
$10,700 there's the equity curve and 
that's been performing quite nicely 
hasn't it over the last two and a half 
years see the close to close we can see 
that the Green Dot show us that we are 
making new highs right up into this day 
or the most recent bit of 
data taking 49 trades percent profitable 
is up in this period to 93 almost 
94% uh average trade is a lot larger 
actually as well is 21 Pips and largest 
losing trade is still the same which is 
our stop loss in fact what I'll do now 
is I'll just include the whole data set 
so we can 
see it as one big picture so I'm going 
to go from January 2010 through to June 
2024 and looking at the overall 
performance obviously we've got the 
trades 
combined got our 89% profitable 
$135 for the average trade but let's 
look at the equity curve and we can see 
that sure enough we're in a good period 
here bit like the early period then it 
went flat and then like I said this most 
recent period has been performing 
particularly well looking at the annual 
period 
analysis we can see that over those 14 
years we've only got two losing 
years and we can see 2010 was a very 
strong year but 
then as we can see on the chart 2022 was 
a good year 23 was pretty good and so 
far 2024 it has been performing quite 
well in fact this year alone we've only 
got seven trades but every one of those 
has been profitable a common observation 
Conclusion 
or sometimes even complaint I get from 
normally newer traders to a strategy 
like we're looking at is that it only 
trades about 20 times a year and I 
totally get that I totally get that most 
Traders want to be placing trades more 
than once every two or 3 weeks so what's 
the answer because you can't force more 
signals from any one single strategy and 
the truth is you're going to be very 
hard pushed to find one strategy with a 
win rate of nearly 90% which trades two 
or three times a day and is profitable 
after trading costs those sort of 
strategies might exist but I haven't 
found them yet not a strictly rule-based 
one anyway so what's the answer instead 
do what I do trade more than one 
strategy I trade a whole collection or 
portfolio of strategies let's say you 
trade five strategies which trade 20 
times a year suddenly that's 100 trades 
a year trade 10 strategies that's 200 
trades a year this is how we build up 
our trading without focusing just on the 
one strategy have a look at some of my 
older videos for some more strategy 
ideas especially if you like these 
strategies with higher win rates you 
should be able to build up a collection 
or a portfolio of strategies too so 
anyway I hope that helps I know it's a 
shorten sweet video today and I know I 
haven't been uploading recently I have 
been really busy mainly working on my 
own strategy development and 
unfortunately I find making the videos 
in between working on these developments 
I just find the videos a little bit 
distracting so it's been really nice 
just to focus solely on strategy 
development so I hope you understand but 
thanks for staying until the end of the 
video and I hope to see you on the next 
one but until then this is <PRESIDIO_ANONYMIZED_PERSON> 
and thank you 
 - Generated with https://kome.ai