M15 SP500 LowBuyHighSell Strategy
Forums › ProRealTime English forum › ProOrder support › M15 SP500 LowBuyHighSell Strategy
- This topic has 46 replies, 11 voices, and was last updated 10 months ago by nonetheless.
-
-
12/06/2023 at 11:41 AM #224928
so… I was taking phoentzs’ basic idea, removing some things and simplifying, what’s left you can see in the code below. please note that the “time” is local US-markets time. and then I was runing some backtests on S&P500 mini-futures on all available data, so from april 2006 till now. and I have to say it’s kind of “gold mine” 😀
performace dashboard and equity line you can find in the pics attached.
1234567891011121314151617181920212223242526272829303132333435363738394041defparam flatafter = 151500if intradayBarIndex = 0 thenordersCountL = 0ordersCountS = 0endifif longTriggered thenordersCountL = 1endifif shortTriggered thenordersCountS = 1endifif time = 151500 thendayC = closedayL = dlow(0)dayH = dhigh(0)dayR = dhigh(0) - dlow(0)endifif not onmarket and time < 133000 thenif close < dayL and ordersCountL = 0 thenbuy 1 lots at marketendifif close crosses under dayH and ordersCountS = 0 thensellshort 1 lots at marketendifset stop ploss dayR*0.50endifif longonmarket and close > dayC thensell at marketendifif shortonmarket and close < dayC thenexitshort at marketendif12/06/2023 at 12:22 PM #224933from my perspective phoentzs’ idea/approach has really plenty and very significant advantages and only some disadvantages. let me mention only selected ones.
- avarage winners being smaller than losers you kind of rely/depend on the hit-rate being and staying > 50%. nothing really wrong with that, since the strategy by itself does not go for really huge winners and maintains moderate risk per trade. this strategy basically “fights” against the previous day’s trend, so kind of against what the “big money” is doing – one has to be aware of that not even try to seek huge profits per trade compared to the risk.
- this strategy’s majority of trades and profits are made with entries outside main trading hours, so when volume/liquidity is really low – which is on one hand obvious disadvantage. but – I assume due to this disadvantage the strategy will be never traded by big traders/institutions with millions and billions in the pockets, and so this is a chance / a niche market for small/retail traders!
- the equity curve is “ugly”, definetely not what majority of small/retail traders dream of. sounds like disadvantage. but I would say – it’s huge advantage, because aside from big traders/institutions not trading it due to liquidity issue, lot of small traders will be probably not trading it due to bumpy equity line which does not spit out cash every day/week/month… and that is what some other traders need – being alone, very alone with the edges one discovered.
12/06/2023 at 1:08 PM #224940Very intressting justisan.
Im not able to reproduce your curve with UTC+1
For me it should look like this?
UTC+11234567891011121314151617181920212223242526272829303132333435363738394041defparam flatafter = 221500if intradayBarIndex = 0 thenordersCountL = 0ordersCountS = 0endifif longTriggered thenordersCountL = 1endifif shortTriggered thenordersCountS = 1endifif time = 221500 thendayC = closedayL = dlow(0)dayH = dhigh(0)dayR = dhigh(0) - dlow(0)endifif not onmarket and time < 203000 thenif close < dayL and ordersCountL = 0 thenbuy 1 lots at marketendifif close crosses under dayH and ordersCountS = 0 thensellshort 1 lots at marketendifset stop ploss dayR*0.50endifif longonmarket and close > dayC thensell at marketendifif shortonmarket and close < dayC thenexitshort at marketendif12/06/2023 at 1:17 PM #224941@justisan
You mean I shouldn’t have spilled the beans about this system? Just so I understand correctly, “Local” time 151500 is CET 231500? So your simplified code always takes the previous day’s candle as a trigger and you have generally used half the previous day’s range as a stoploss. I’m becoming more and more convinced that this principle is a pretty robust thing.12/06/2023 at 3:31 PM #224960please note as mentioned that I was running the code on futures data, and on time zone of u.s.-exchange. there main trading hours are 08:30-15:15, which usually corresponds to 15:30-22:15 CET, but not always – because of other time differences during “daylight saving”-adjustments in u.s. and europe. so you will need some tricks and effort just in order to replicate 100% correctly the time data if your run the code on sp500 cfds in the CET zone. please note as well that in my code system considers only entries from 00:00 till 13:30, so in the (CET-adjusted) line
“if not onmarket and time < 203000 then”
you have to add a time condition “and time >= 070000” if you run it on cfds/CET (and change to different time during dayligh-saving adjustments)
there are other differences as well, which one has to consider when running a system on cfds vs futures, so you will probably never see exactly 100% same result on both even for exactly same code.
phoentzs,
my code for futures does not really look at daily/24h candle. as you see I even removed the daily timeframe. as “close” I am taking the close at 15:15 – so at the end of the main trading hours. and for day’s high and low I am taking the highest/lowest price points which where set by market from midnight through the main trading hours until 15:15= very end of main trading hours (maybe it would be enough just to consider high/low/close of main trading hours 08:30-15:15, I did not test it yet, but sure I will).
yep, me was well – I am very convinced about robstness of your general idea/concept. you have very few very stright forward parameters, which you either cannot “optimize” at all, or which you cannot “optimize” a lot, and even quite significant changes of some parameters do not destroy the system totally. it’s very hard to “kill” this system (unless one changes it in some way which happens to be total nonsense). and this is what one wants/needs to do – try to “kill” system, instead of “optimizing” it for beutiful equity curves (and then sell them on “marketplace” :-D). maybe it’s like serious science: scientist invent a theory – and then they try their best to falsify it, serious scientists are not trying to prove it. for “normal” people it’s very depressing approach, when it comes to science, and when it comes to trading. but “normal” people lose money in the markets, right? and lose at lot, and lose very consistently…(I mean – I am talking here my own loser-experience as well!) so “you and me” need to do/behave very ab-normal in order to make money in the markets. (see what happens right now: dax is making new all time highs – and what is the customer sentiment on IG platform? 83% are short… no need to add anything about “normal” behaviour)
now, about you “spilling the beans” 😀 my personal view is – you should not have done it. but it is always up to you… I was also thinking some while before publishing my adjustments (still not all of them… there is a very simple way to quite significantly improve short trades of that system) and insights from s&p futures backtest. but in the end I decided to publish it – because you published your general concept. I hope folks here appreciate a lot your contribution/inspiration!
1 user thanked author for this post.
12/06/2023 at 6:55 PM #224969The words are very wise… and the more I think about it and deal with simple things without many indicators, the more lights come on in my head. I have coded many hundreds of systems… a lot in TF 1 minute… but my best system, robust for years, is a simple M15 system that works long and short. By the way, the basic framework is also one of my topics here in the forum. 😉 Just thinking out loud… and then a few weeks ago you opened my eyes to just trying systems without indicators. I’ve never really tried it before… what can I say… it seems to work. Not just this idea here, but other ideas too. I was probably a classic example of thinking that some magical combination of indicators would give you an advantage in the market. It’s all cheese, the simplest things really seem to be the most robust.
12/07/2023 at 1:50 PM #225002…I am not getting rid of the feeling/conviction that indicators were invented by brokers, system sellers, and other kind of folks who do not trade their own money (any more?…) but want “you and me” to trade (and/or buy their books and other kind of “education”). I mean – they need permanently a lot of new customers because so many are losing and dropping out all the time. So they need to offer a reason and tool for potential market players to start trading – and trade a lot. And indicators are such a marvelous “tool”! I remember myself many years ago thinking similar like: “ Wow! All these indicators! – so many ways to make money in the markets!!”. Now I have to turn this statement around: “Wow! All these indicators! – so many ways to lose your money in the markets!!”. And now “artificial intelligence” will exorbintantly increase the number of those many ways 😀
I can still imagine that some not directly price related “indicators” like traders’ sentiment and traded volumes are of potential value for decision making.
12/08/2023 at 9:13 AM #22503912/08/2023 at 9:20 AM #22504212/08/2023 at 9:33 AM #22504301/19/2024 at 7:07 PM #226608Hi Phoentzs, thanks for sharing this algo – nice idea.
Here’s a treatment with a few small changes.
UK times, positionsize = 5
1 user thanked author for this post.
01/19/2024 at 7:49 PM #22661101/19/2024 at 8:19 PM #22661301/20/2024 at 12:59 AM #226616Hey Grahal, hope all is well with you. I’ve been lurking around in the background for a while, always good to see new ideas!
1 user thanked author for this post.
01/20/2024 at 12:29 PM #226623 -
AuthorPosts
Find exclusive trading pro-tools on