I really respect you and like your channel. I will say, in this specific video, with 36k iterations and no out of sample, I'm sure your results are curve fit, at least to some significant extent. I do appreciate your great content, though, as always.
Additional market testing of the same strategy is one of the best robustness tests you can use which the strategy looked like it passed quite well here.
Just do a "look inside bar" test on this one, and it quickly falls apart. With that said, there are other ways to modify this "core" of a strategy to make it more robust.
In Format Strategy > Format > Calculation Version 9.5 Do you choose to 'Enable intrabar order generation and calculation"? If so, which options do you check? I ran the 15-25-45 strategy, from 8/2001 to 8/16/22 I 'Enabled order generation etc.' And chose: 'Limit entries from all signals in this strategy to once per bar' and, 'Allow any exit from this strategy to occur multiple times per bar' The difference in the results of choosing to enable order generation etc, and not choosing it were huge. $352,090.00 on 967 trades (enabled) $188,580.00 on 948 trades (Order generation tab not enabled in Strategy Format) Thank You for highlighting this strategy, its wonderful. Im curious of your thoughts on my observations.
intrabar 1 minute is more than enough. basically you want to find out which level hit first, profit target or stop loss, if the difference between the two levels is big, one minute is more than enough. Now there might be occasions where it will be wrong, because volatility is too high and both levels might hit in one minute bar, but those are rare. I just retested the strategy 012007 to 072022 and Net Profit $86K, #trades 132, Avg Trade $651
Thank you so much for this one, Ali! I really appreciate that you show the code so we can learn more and maybe build something new out of what you're showing us. Keep this kind of content coming please. 🙂
Although the idea behind breakouts is very common, it is great you gave a list of some futures that works best with the concept! BUT, if you check theses strategies with inside bar look up, you realize they are not usable in real-time. Please make an update video with the correct way to use it .. :)
I just did the retest now with 1 minute bar magnifier, Net P/L +$291K, Avg Trade $413. if you set your stop loss +5x your profit target and > ATR then you remove the probability of hitting both in the same bar without testing high resolution bars just to get an idea.
Please redo this strategy but then with commitment of trader reports to decide long only or short only during certain periods. It could be an even better strategy. I think Larry williams used a similar strategy during his world record, he didn''t just use a breakout strategy, he combined it with COT during his world record run.
the course will go through fundamentals of strategies, building strategies, filters, testing for robustness, automation, all in SQX. SQX can export code in plain English, TS/MC, MT4, so you copy and paste Although I trade futures, but everything can be applied to futures, stocks, forex, etfs
Yes SQX i have it because of you Ali ! But what I would like to know is whether you plan someday to cover how algo trading on TS is done, especially for contracts expirations, how is that handled if you are a long term trend follower Subscribed for the course ! And soon to be in the discord :)
unfortunately that is not a popular question on youtube, which is what I based my videos on. but when you join discord you can definitely ask and will answer in Live Q&A session, also it will be recorded and added to the Q&A database.
@@StatOasis great stuff - I came back to this video today :-) what platform do you trade with? I have been using MQL5 platform since I enjoy MQL OOP methodology, do you have any comments?
the correct drawdown is in the equity curve. when you look at the yearly bars, the software is adding all drawdowns together even if they don't happen sequentially, which is of course wrong, because in reality it doesn't work like that. for example: win 1000 , PL=1000 lose 500 , PL=500 win 500 , PL=1000 lose 1000 , PL=0 the above MAX DD is 1000, but the software will show 1500
As always - amazing. Pure gold :) 1 question- when using a daily bars , and once you have dollar amount for sl/tp, how does the backrest know which one hits firsts? I mean assuming that the candle was big enough to include both of them. I do know that this is a problem when doing back test without look inside bar data.
you are correct, you need to drill down to 1 minute time frame to see which one happen first, you can do that by trading one minute chart while the signal is coming from daily chart. also most platforms have the ability to test the strategy using 1 minute bar (higher resolution) to see which threshold triggered first
@@StatOasis I’m facing this issue when using TS protfoli maestro. When testing long periods using daily bars, we can’t tell if our results are right or not. And looking inside bar is only valid for last few days. Working with minutes bars is an option, but retrieving the data and running the analysis is timely cost . Thanks Ali!
you can mitigate that by pushing PT to 2 ATR roughly so SL and PT probability of hitting in the same bar is a lot less. just to get an idea, then you can test on 1m for all instruments
@@StatOasis You are truly a treasure Ali. Glad to find your amazing channel, with true , tested, no BS , useable information. I’m a true fan. Thanks again!
@@StatOasis trading one minute chart while the signal is coming from daily chart,that is good and simple mathod. I am very surprised that SQX can't support higher resolution restesting function for TS/MC engine, it looks simple to implement
You got a good reaction to this one Ali, how about getting a few of the ones that mean revert the best (whilst avoiding the overly correlated ones together) and put them in a portfolio together with the trenders, I know you have done a portfolio of mean reveterters previously but I'm a daily bar man myself
I went back and tested this strategy after final optimization, 15-25-45, I put the exact dates you used at the time 1/2/200 thru 3/1/2022, limiting entries and exits from all signals in the strategy to once per bar. Many numbers came up the same, except total numbers of trades, I had 743, and net profit of 310K. I dont know why im consistently coming up with so many more trades than you, within the same parameters. Now I know perhaps Im being picky, (I prefer thorough). Just wondering what the discrepancy might be. Excuse so many questions lately, Ive been testing quite a bit lately, your strategies, which are wonderful :)
No worries, if u have the same code using same data same platform then it should match 100% But like u mentioned if beginning/end dates change of course it will change number of trades
@@StatOasis using TS...I ended up with 60 more trades than you. Re: This comment you made: StatOasis 1 month ago I just did the retest now with 1 minute bar magnifier, Net P/L +$291K, Avg Trade $413. if you set your stop loss +5x your profit target and > ATR then you remove the probability of hitting both in the same bar without testing high resolution bars just to get an idea. When you say stop loss +5x your profit target and > ATR Do you mean that the profit target should be 5 times higher than the stop loss as it was in the Natural Gas presentation?
yes, you are correct, the ATR is great help here, because it will tell you on average how much the market move per day, so if there is 3 ATRs between PT and SL, it will be hard to hit both on the same bar (not impossible though), so 5ATRs should be even less probability. if you use longer period ATR (>20) then the probability will increase a lot, because ATR will take longer to adjust to higher volatility.
I have a method that I teach in my course to sniff out market edge. keep in mind not all markets have a distinct edge for breakout or mean reversion, but many do.
All calculations are based on 1 contract regardless of account size. The account size will only play a role in DD%, i think default value is 10k or 100k. Thats why i talk in dollars so DD is the same regardless of account size.
I am testing this on futures markets, I think XAU is a CFD, but it doesn't hurt to test, of course you will have different values for SL, PT, BE as the point value for XAU is different than @GC
I really respect you and like your channel. I will say, in this specific video, with 36k iterations and no out of sample, I'm sure your results are curve fit, at least to some significant extent. I do appreciate your great content, though, as always.
Thank you, of course there is a big probability of over fit, any strategy has to go through robustness testing before committing any capital to it
Additional market testing of the same strategy is one of the best robustness tests you can use which the strategy looked like it passed quite well here.
Just do a "look inside bar" test on this one, and it quickly falls apart. With that said, there are other ways to modify this "core" of a strategy to make it more robust.
@@5.56mm Great insight there. So many don't think to use LIBB when backtesting, and it can make a huge difference.
@@covingtoncreek Yup, and it must be said before people go losing money by trading it live. 🙂
In Format Strategy > Format > Calculation Version 9.5
Do you choose to 'Enable intrabar order generation and calculation"?
If so, which options do you check?
I ran the 15-25-45 strategy, from 8/2001 to 8/16/22
I 'Enabled order generation etc.' And chose:
'Limit entries from all signals in this strategy to once per bar'
and, 'Allow any exit from this strategy to occur multiple times per bar'
The difference in the results of choosing to enable order generation etc, and not choosing it were huge.
$352,090.00 on 967 trades (enabled)
$188,580.00 on 948 trades (Order generation tab not enabled in Strategy Format)
Thank You for highlighting this strategy, its wonderful. Im curious of your thoughts on my observations.
intrabar 1 minute is more than enough. basically you want to find out which level hit first, profit target or stop loss, if the difference between the two levels is big, one minute is more than enough. Now there might be occasions where it will be wrong, because volatility is too high and both levels might hit in one minute bar, but those are rare.
I just retested the strategy 012007 to 072022 and Net Profit $86K, #trades 132, Avg Trade $651
Thank you so much for this one, Ali! I really appreciate that you show the code so we can learn more and maybe build something new out of what you're showing us. Keep this kind of content coming please. 🙂
Thank you for your kind words
Although the idea behind breakouts is very common, it is great you gave a list of some futures that works best with the concept! BUT, if you check theses strategies with inside bar look up, you realize they are not usable in real-time. Please make an update video with the correct way to use it .. :)
Please check Natural Gas portfolio video, same concepts with wider distance between SL & PT
Although I did test this using 1m look inside bar
Good Afternoon, Very nice presentation. Unfortunately this strategy did not pass look inside bar back testing, any suggestion.
I just did the retest now with 1 minute bar magnifier, Net P/L +$291K, Avg Trade $413.
if you set your stop loss +5x your profit target and > ATR then you remove the probability of hitting both in the same bar without testing high resolution bars just to get an idea.
Thanks for responding, you meant stop loss 5xATR
SL 5x PT, it is definitely > 1ATR
@@StatOasis Thanks
Did you do a video on how you determine market characteristics? That would be very interesting! I'm referring to "Futures Edges" at 3:02.
that is part of my Algo Trading Masterclass, buy you can use ADX to compare markets relative to each other
Please redo this strategy but then with commitment of trader reports to decide long only or short only during certain periods. It could be an even better strategy. I think Larry williams used a similar strategy during his world record, he didn''t just use a breakout strategy, he combined it with COT during his world record run.
Will add it to post ideas
Ali that's pure gold ! Thanks!!
When are you planning on opening the enrollment for the course?
And in the couse will we see how to apply these strategies in the futures market? From sqx to ts
the course Algo Trading Masterclass "ATM" will open in couple of weeks, make sure to subscribe to email list to be notified at Go.StatOasis.com/ATM
the course will go through fundamentals of strategies, building strategies, filters, testing for robustness, automation, all in SQX.
SQX can export code in plain English, TS/MC, MT4, so you copy and paste
Although I trade futures, but everything can be applied to futures, stocks, forex, etfs
Yes SQX i have it because of you Ali !
But what I would like to know is whether you plan someday to cover how algo trading on TS is done, especially for contracts expirations, how is that handled if you are a long term trend follower
Subscribed for the course !
And soon to be in the discord :)
unfortunately that is not a popular question on youtube, which is what I based my videos on. but when you join discord you can definitely ask and will answer in Live Q&A session, also it will be recorded and added to the Q&A database.
Great video, how long have you been live trading the markets? Or just demo / backtesting?
I started in 1999 the end of dotcom bubble
@@StatOasis great stuff - I came back to this video today :-) what platform do you trade with? I have been using MQL5 platform since I enjoy MQL OOP methodology, do you have any comments?
Also at 7:53 - 182,000 is not the lowest one as you can see at lines below that. Guess the sort is by something different. Am I right?
I did 3 criteria sorting at one point, but I don't remember if that was in the final edit
Great video. What is the starting capital allocated to each instrument for the portfolio that has generated approximately $1.7 mill profit.
by default TS & MC start with 100K, but almost all of my youtube strategies are traded with fixed one contract
Great video! why at 11:42 it shows a drawdown of ~$100k in 2009, yet at 11:45 it shows a max drawdown of ~$15k ??
the correct drawdown is in the equity curve. when you look at the yearly bars, the software is adding all drawdowns together even if they don't happen sequentially, which is of course wrong, because in reality it doesn't work like that. for example:
win 1000 , PL=1000
lose 500 , PL=500
win 500 , PL=1000
lose 1000 , PL=0
the above MAX DD is 1000, but the software will show 1500
@@StatOasis got it. Thanks so much for the explanation!
how do you know if a market has an edge mean reverting or breakingout?? Thanks Ali
There are many ways, i show three methods in my Algo Trading Masterclass.
You can start with simple MR strategy and see how the market behave
Cheers Ali, thanks for sharing.
Thank you for watching
Hello Ali. could you please help me how define the distance between the current candle, and the last point that ema10 crossed ema20, in SQX.
You need to set a counter when the cross happen and then close-close[counter]
As always - amazing. Pure gold :)
1 question- when using a daily bars , and once you have dollar amount for sl/tp, how does the backrest know which one hits firsts? I mean assuming that the candle was big enough to include both of them. I do know that this is a problem when doing back test without look inside bar data.
you are correct, you need to drill down to 1 minute time frame to see which one happen first, you can do that by trading one minute chart while the signal is coming from daily chart.
also most platforms have the ability to test the strategy using 1 minute bar (higher resolution) to see which threshold triggered first
@@StatOasis
I’m facing this issue when using TS protfoli maestro.
When testing long periods using daily bars, we can’t tell if our results are right or not. And looking inside bar is only valid for last few days.
Working with minutes bars is an option, but retrieving the data and running the analysis is timely cost .
Thanks Ali!
you can mitigate that by pushing PT to 2 ATR roughly so SL and PT probability of hitting in the same bar is a lot less. just to get an idea, then you can test on 1m for all instruments
@@StatOasis
You are truly a treasure Ali.
Glad to find your amazing channel, with true , tested, no BS , useable information.
I’m a true fan.
Thanks again!
@@StatOasis trading one minute chart while the signal is coming from daily chart,that is good and simple mathod. I am very surprised that SQX can't support higher resolution restesting function for TS/MC engine, it looks simple to implement
Simple but effective strategy! Thank Ali 🙏
Thank you for watching
@@StatOasis I learn from every video of you. You are like my mentor 🤝
Glad to be of help
Absolutely brilliant!
That’s so nice of you
You got a good reaction to this one Ali, how about getting a few of the ones that mean revert the best (whilst avoiding the overly correlated ones together) and put them in a portfolio together with the trenders, I know you have done a portfolio of mean reveterters previously but I'm a daily bar man myself
sure that is a good idea
That cup and handle wodoo science part was really funny. :D
😀 technical analysis is filled with them
I went back and tested this strategy after final optimization, 15-25-45, I put the exact dates you used at the time 1/2/200 thru 3/1/2022, limiting entries and exits from all signals in the strategy to once per bar. Many numbers came up the same, except total numbers of trades, I had 743, and net profit of 310K. I dont know why im consistently coming up with so many more trades than you, within the same parameters.
Now I know perhaps Im being picky, (I prefer thorough). Just wondering what the discrepancy might be.
Excuse so many questions lately, Ive been testing quite a bit lately, your strategies, which are wonderful :)
No worries, if u have the same code using same data same platform then it should match 100%
But like u mentioned if beginning/end dates change of course it will change number of trades
@@StatOasis using TS...I ended up with 60 more trades than you.
Re: This comment you made:
StatOasis
1 month ago
I just did the retest now with 1 minute bar magnifier, Net P/L +$291K, Avg Trade $413.
if you set your stop loss +5x your profit target and > ATR then you remove the probability of hitting both in the same bar without testing high resolution bars just to get an idea.
When you say stop loss +5x your profit target and > ATR
Do you mean that the profit target should be 5 times higher than the stop loss as it was in the Natural Gas presentation?
yes, you are correct, the ATR is great help here, because it will tell you on average how much the market move per day, so if there is 3 ATRs between PT and SL, it will be hard to hit both on the same bar (not impossible though), so 5ATRs should be even less probability. if you use longer period ATR (>20) then the probability will increase a lot, because ATR will take longer to adjust to higher volatility.
So for this type of strategy, you recommend a profit target that’s 3-5x higher than the stop loss?
The difference is 5x, so you can have 3ATR SL and 2ATR PT that will make distance between them 5ATR
how to use ADX as a filter for your strategy: th-cam.com/video/I4EC4fB2j4U/w-d-xo.html
How did you find out which markets work well on which strategy type like i.e. breakout?
I have a method that I teach in my course to sniff out market edge. keep in mind not all markets have a distinct edge for breakout or mean reversion, but many do.
What is the initial account size for this test?
Assuming you always use the same :)
All calculations are based on 1 contract regardless of account size.
The account size will only play a role in DD%, i think default value is 10k or 100k.
Thats why i talk in dollars so DD is the same regardless of account size.
Hi
any update of algo courses?
when it will start.
i have subscribed thru email but ...
thanks for subscribing. in couple of weeks, you will be notified via email
What symbol do you use for gold futures? I use broker FXTM, but i don't see any gold futures, only XAUUSD.
I am testing this on futures markets, I think XAU is a CFD, but it doesn't hurt to test, of course you will have different values for SL, PT, BE as the point value for XAU is different than @GC
What is the amount of capital for each strategy in the portfolio?
portfolio starts with $100K for all strategies
@@StatOasis
So no separate capital for each symbol?
no
another good one!
Thank you! Cheers!
How to make an ea with this ?
Do it in SQX and export the code
@@StatOasis need step by step tutorial,:( still create no EA that is profitable with SQX,VERY FEW TRADES, no profits
What do 5000 and 500 refer to? Pips?
they refer to amount in $
that cup and handle vodoo comment got me laughing 😂
😀
how can i contact you?
info at StatOasis dot com
or you can submit a form on my website StatOasis.com