5D·

Day trading automation supported by scripts and AI

$IREN (+5.67%) In the course of the "momentum" of trading with the help of AI, I am testing some of my standard setups. AI is actually only used indirectly here, i.e. I have had my indicator and strategy scripts scripted and improved with the help of Claude and Copilot. In the end, there have been around 25 iterations so far 😂


There will be a few more, as I want to improve the strategy in relation to price action and dynamic SL.


Enclosed for those interested in day trading my results on the box setup. What is the box theory about?


In box theory day trading, it is assumed that the price tends to overreact at the edges of the previous day's range: at the upper edge, a downward bounce is expected with increased probability (= short trade), as this is where the strongest sellers entered the market the day before. Whereas the lower edge is more likely to see an upward rebound is more likely to occur at the lower edge, as the strongest buyers entered the market the day before (= long trade). This creates clearly defined zones in which traders can speculate on trend reversals or false breakouts.


Management is important here in the event of a strong trendi.e. when the breakout from the box occurs. This is where the know-how of Orderflow and PriceAction comes into play. This was the trickiest part of my scripts, but with the help of AI I was able to code it 😁


For example, I can adjust the hysteresis of the activation zones at the bottom and top edge in the settings. I can also trade based on wick or body. Restrict order times and activate or deactivate confirmation candles for the fire signal.


☝What is really interesting is that with very conservative risk management (SL at -1% / TP up to +10%) a good result is achieved! A fairly low win rate of under 30% is enough to make a good 50%+ in half a year, and that with a maximum drawdown of 5%☝😆


Enclosed a screenshot of the sample 5min chart October 2025-April 2026


In the upper part of the screenshot you can see the chart, on the right the orange box, which represents the range of the previous day. At the upper edge you can see the area highlighted in red, which represents the short activation zone using the script. If the candlestick formation matches my strategy, the "fire" signal appears and triggers the short trade.

In the lower area you can see the statistics of all trades since October 2025.

attachment
attachment
attachment
attachment

UPDATE: I have added a small detail so that I can use a toggle to choose whether I want to wait for the trade to close or let it continue until the SL / TP. The drawdown risk goes up, but so does the return - 28% to +195%

attachment

#trading

27
19 Comments

profile image
Ok, I only understood half of it, but I think you need a bit more time for that. 🙈
11
profile image
@TradingHase Is very day trading-heavy🙄

To summarize: in 6 months with this setup +50% return with max drawdown of 5%. The stop loss was always set to -1%. The TakeProfit is forced at the close of trading or triggered beforehand at +10%. Due to the ratio of -1% to +10%, only 28.57% of the trades were profitable in the end, but the bottom line was +51% outcome.
7
profile image
@TomTurboInvest That's understandable for the hare. 👍🏼 That's a return that won't happen for me, but I think you have to have the time for day trading.
3
profile image
@TradingHase Well, with a trading view strategy you can automatically create orders with a connected broker. @TomTurboInvest sounds too good to be true 😁
3
profile image
@TradingHase Well, if you do it intensively, it can take 2-3 hours a day. But that's it. On normal days, you're done with just over an hour...
3
profile image
@BeachPlease At the moment I'm not brave enough to go all the way to IKBR. But I'm currently testing very intensively. If it goes well over the next few months, then I'll slowly start automating. This would have the advantage that the human factor would be eliminated and wouldn't make any nonsense. The script or strategy is executed mercilessly, which is something I can't say about myself 🤪
3
profile image
@TomTurboInvest I'm curious. That would actually be too easy.
1
profile image
@TomTurboInvest Yes, this discipline 😆 I keep noticing that deviating from the strategy is punished almost immediately.
Are you planning to publish the script?
1
profile image
@BeachPlease was my initial plan, but now I'm more inclined to "do not publish for the time being". If the indicator and the strategy work sustainably after extensive testing, then maybe sell. Let's see.

There are some scripts for the box theory, but they are all very simple, basically just showing the range from the previous day. I've put quite a lot into it, including candle formations/sequences that I use as fire signals, etc... The code is already 600 lines long 🤪
2
profile image
@TradingHase I've been trading the box for a while, but only on selected days. To pack in all aspects and parameters, a lot of details come together. The code is currently just under 600 lines. I am testing with many stocks and have a spread of +100% to -10%, but I know what I need to adjust in the script to get this out. If it is to run automatically, then you have to take a brutal number of aspects into account...
3
@TradingHase You've already understood half of it. Great! I'm not there yet :-D
4
profile image
You can now officially call yourself a Vibe Coder 😁. But very good, sensible use of AI for your use case - and obviously learned a lot in the process. What is your technical background?
1
profile image
@DonkeyInvestor I used to be an engineer for electronics and communications technology, but then took a wrong turn and now work in project and process management in finance, but always technically driven and work closely with IT. I learned programming a long time ago, but there's not much left of it. But I can read the code and, most importantly, I can describe what I want to the AI 😁
2
profile image
@TomTurboInvest top, Claude and co were created just for you 😁
1
profile image
Nice one👍
1
profile image
Very cool, thank you 👍🏻
1
profile image
For those interested, I added an update today. This changes the outcome of the strategy quite start. To max drawdown "-28% and profit +195%". Now it's time to test many stocks in the next few weeks and refine the setup 😵‍💫
1
profile image
Anyone who believes that they have suddenly discovered a strategy thanks to AI is forgetting that a few billion people can do the same. Including a few who have been playing the market for decades.

AI does not undermine market laws.
profile image
@Charmin the strategy doesn't come from the AI, I just had the strategy scripted with the help of AI, my programming skills wouldn't have been enough 🤷🏽‍♂️

I have been trading this strategy "manually" for some time, now I have an indicator script that shows me exactly the sell or buy zones, the corresponding strategy script then implements the trades as soon as the price dips into these zones and the corresponding price action including order flow occurs. I can set parameters such as SL and TP accordingly. The basis for later automation, so to speak.

The strategy has been around since the 1950s, and the person who developed it wrote a book about it. He made a profit of USD 2 million within 18 months. But copying is not that easy, the devil is in the detail, or you could also say know-how. Alongside the VWAP strategy, this strategy is certainly one of the most frequently traded day trading strategies. This is all about what you can do with AI support.

Since the market laws have not been overturned since the 1950s, this will not happen now with the script either, BUT I can automate my trades😅💪
3
Join the conversation