18H·

Update Trading Script Daytrading BoxStrategy

$OUST
$IREN (+10,35%) In the meantime, my day trading script for the box strategy has also "matured" 😁


With approx. 1,600 lines of code, I now have a status with which I can carry out extensive tests. In addition to the script, Claude has also created a manual in DE and EN for the strategy and all settings, and the code is also fully commented.


Towards the end, good exits were the trickiest part of the script. The entries were OK quite quickly, but sometimes the exit was not automatic or the profits were lost again until the trade reached the SL again at some point. But that has now been solved.


The trades are automated, in addition to the corresponding price action and confirmation candles, I can also set the exit scenarios quite flexibly. From fixed SLs and TPs to dynamic SLs above or below the candles to automatically trailing SLs etc.


Here is also an example from Ouster of how the trade is started based on the signal candle (hammer) in the activation zone and then the SL from the break-even point is set.

protection up to the automatic transition to the trailing SL and take profit.


The red line below the candles is the automatically fixed SL which is trailed to break-even after a certain profit, from a further threshold x is then automatically switched to the dynamic trailing SL (blue SL line which is automatically trailed).

attachment
attachment
attachment

Now it's time to test extensively with many different stocks! I will get back to you once the tests have been completed.


#trading

29
9 Commenti

immagine del profilo
It all sounds incredibly exciting and a bit like a shortcut to building up capital. Unfortunately, I don't understand how the bot works, i.e. the basics for setting it up. How do you do the backtesting? Do you know that your hit rate works well across all market phases?
1
immagine del profilo
@market_whizkid_2675 I do backtesting directly in TradingView. Because I test many stocks (large caps to small caps), I cover a lot, including different market phases. The critical thing about the mean reversion strategy is that I have to suppress trades or hedge them closely if the trend is strong and breaks out of the box. I intercept this via my activation zones. I place them at the edges of the box with a hysteresis that works both outside and inside the box. And trades are only triggered in the activation zone, but only if the price action, i.e. previous and subsequent candles, match. The candle size in relation to the range is also taken into account. The script is now quite complex, even opening and closing ranges can be excluded, or the overriding trend can be included.
The hit rate does not have to be that high if the losers are strictly limited. The win rate is rarely over 50%, but the performance can still be over 100%.
All my trading knowledge has gone into it, so I'm refraining from publishing it for the time being. If it works sustainably, then I can consider whether to publish it or just sell it.

PS: in the last screenshot of the original post you can see a win rate of only 14% but a profit of +195%, this is because the losers are very limited, but the winners are running. At that time, the script was not yet up to date, many of these now "mini losers" no longer occur, as the price action is better mapped and there are no more trades "firing" 😁
4
immagine del profilo
@TomTurboInvest How do you get started with such a script? I did not understand the API structure. TradingView then accesses the broker directly?
immagine del profilo
@market_whizkid_2675 Yes, I connect TV to IKBR and normally trade directly from the chart in TradingView, currently still connected to TradingView Papertrading. But if I'm brave enough, I'll switch from TV Pakertrading to the connection to IKBR.

But I already have my manual trading directly from TradingView, i.e. I place the orders there and these are routed through to IKBR.
immagine del profilo
Respect, very impressive work! I can't wait to see what happens next.
1
immagine del profilo
Will you tell me if you want me to sell Irish? :-D
1
immagine del profilo
Very good work 👏🏻
1
Can you be booked? 😉
1
immagine del profilo
@UliB No, is not possible😉
1
Partecipa alla conversazione