No-Indicator Buyers vs Sellers Strategy
This simple strategy demonstrates how to work directly with raw market data without using any indicators. It looks for potential accumulation and distribution patterns:
Accumulation (BUY signal):
- The total volume of sells is higher than buys (possibly larger players selling)
- But the number of buy transactions is higher than sells (possibly more small buyers stepping in)
- This could indicate larger sells being absorbed by multiple smaller buyers, potentially preceding a price increase
Distribution (SELL signal):
- The total volume of buys is higher than sells (possibly larger players buying)
- But the number of sell transactions is higher than buys (possibly more small sellers stepping in)
- This could indicate larger buys being distributed to multiple smaller sellers, potentially preceding a price decrease
function onBar(data, indicators, positions, trades) {
const rowCount = data.close.length;
const signals = new Array(rowCount).fill("HOLD");
for (let i = 0; i < rowCount; i++) {
// Get volume and transaction counts
const buyVol = data.buy_volume[i];
const sellVol = data.sell_volume[i];
const nBuys = data.number_of_buys[i];
const nSells = data.number_of_sells[i];
if (buyVol < sellVol && nBuys > nSells) {
// Accumulation: high sell volume but more buy transactions
// Might indicate larger sells being absorbed by multiple smaller buyers
signals[i] = "BUY";
} else if (buyVol > sellVol && nBuys < nSells) {
// Distribution: high buy volume but more sell transactions
// Might indicate larger buys being distributed to multiple smaller sellers
signals[i] = "SELL";
}
}
return signals;
}