My main DCA bot is code on a server — it sees the exchange directly. But one day I wanted to run the same strategy on another exchange and another market, here and now. Why dig into the server and rewrite the bot when you can have a separate engine that launches in minutes? So I moved its logic to TradingView — for myself: every hour, pick the most volatile coin with a rising trend from a pool and send it to any bot with a webhook. That's how the Allocator was born.
Moving the idea turned out to be only half the job. An idea can be right while its execution is wrong. I've tried plenty of strategies and indicators on TradingView, and none of them survived contact with live trading. So I decided to test mine live from day one.
The test. On October 23 I launched a multi-pair bot on Veles driven by the Allocator and watched the TradingView model side by side. In the first 24 hours the bot made 8 deals and $1.01 profit. The model counted 37 deals and $3.75. A 3.7x gap. On history, the Pine model overstated deals and profit 3–5x.
The cause is not the idea but TradingView itself. The model was calculated on 5-minute candles. Inside a candle it sees the high and the low, but not which came first. It "bought" at the low and immediately "sold" at the high — while in reality the high often came before the low, and that trade never happened. This trap applies to any grid backtest: if the take profit is smaller than the candle's range, the model draws trades that never existed.
As often happens, I found this by chance — only because I ran the bot next to the model. As Pushkin put it: "And chance, the god of invention."
The fix. Now the Allocator walks every candle minute by minute, in the right order. The same 24 hours: 8 deals vs 8, $0.83 vs $1.01. And right now, with a live stuck position in $PENGU , the model and the bot match: same entry, same 6 of 7 orders filled, average price 0.00786 vs 0.00787 (screenshots below). Where TradingView has no minute history (beyond roughly three weeks), the table itself marks the numbers red as "overstated".

https://www.tradingview.com/x/xETdrAUx/



Besides picking the coin, the Allocator is built as a handy test bench: turn on the second dashboard and change the grid's geometry and depth on the fly — and even how it's built, by price step or by total coverage. No separate script for each test run: the whole picture and the alternatives are right in front of you.
I now have two executors of one strategy: the server bot since September 2 and Veles with the Allocator since October 23.
Follow along: I test what I believe — and drop what the numbers don't support.
#DCA #DCABot #TradingBot #GridTrading #TradingView
No guessing here about where price goes or which levels to watch. Here it's statistics and math against an unknown future.
Not financial advice. Leveraged futures can wipe out your deposit.
