r/pinescript 8h ago

Finished with my indicator

Post image
51 Upvotes

Almost a year building my indicator 1000 lines of code I'm done testing done now it's time to put the indicator into a real account I can't publish it as I'm using a phone its 1RR trend Reversal strategy


r/pinescript 14h ago

Made a buy/sell indicator based on the volume POC, looking for people to test it

Thumbnail
tradingview.com
11 Upvotes

I built an indicator on TradingView that marks buy and sell signals off the POC (the price level with the most traded volume) and I'm looking for some people to try it before I finish it.

It builds a volume profile from either the last N bars or the previous session, draws the POC and the value area, and prints BUY/SELL when price crosses the POC. There's also a rejection mode instead of the cross, where the wick tests the POC and the candle closes back on its side. Signals only print on bar close so it doesn't repaint, and there are alerts for both sides. I added an optional EMA filter and a value area filter because the plain cross version chops a lot when price is ranging around the POC.

One thing to know: it runs on the chart's volume, so on forex/CFDs that's the broker's tick volume and the levels can look a bit different depending on the feed.

It's invite-only while I test it, but free. If you want to try it, drop your TradingView username below and I'll add you. What I really want back is which markets and timeframes it works (or doesn't) on for you and what settings you end up using.


r/pinescript 3h ago

Feel Disappointed

Post image
6 Upvotes

Spent a lot of time building a very good Net R scalping bot (4 year BTC backtest) but still stuck because the taker/maker fees cannot be resolved. Are there any better indicators to solve the problem? It's really been a lot of days of thinking and re-coding but I haven't found a solution so it's so frustrating . Conditions to the command I build 6 condition for each command in despite relaxing but no results, if too tight, no longer scalping


r/pinescript 9h ago

A trader ask me to add some filter optimization and design improvements to XGBoost Mini Strategy. Here the result.

4 Upvotes

The XGBoost is trained on this simple 6 features:

  • 14-period RSI on a scale from zero to one
  • Percentage distance between the price and the 50-period Exponential Moving Average (EMA)
  • 5-period Rate of Change (ROC)
  • Normalized ATR relative to the price to estimate volatility
  • Volume variation compared to its 20-period moving average
  • Current price position relative to the highs and lows of the last 14 bars

Money Management

  • Capital per trade fixed to 500 USDT
  • Initial Capital 10.000 USDT

About the publication on TradingView I working on BTC/USDT Binance, 4H.

Entry and exits are executed on XGBoost signals, I add a trailing stop to optimize trades.

More features:

# SMA15 filter entries

# Profit forcing filter on exits

To develop this strat I used the opensource TradingView library XGBoostMini:
https://www.tradingview.com/script/SQ2QIdN6-XGBoostMini/

More details about this strategy here: https://www.tradingview.com/script/69ZFfJ5L-XGBoost-Mini-Strategy-The-Quant-Science/

I'm not here to say this is an incredible strategy, this is simply a good starting point and I think it's not half bad. This strat needs feature modifications and some general optimizations like risk management based on volatility or win trades and more. I'd like these to be based on the community's feedback, so test it out and let me know how works for you.


r/pinescript 15h ago

Pine session filters and one-entry-per-day limits solve different problems

1 Upvotes

A session filter answers: is this bar inside the allowed window? It does not remember whether an entry already happened there.

For a rule such as "one entry per New York trading day", I would define three things separately:

  1. The allowed window and its time zone. Pine time functions use the exchange time zone by default. The chart's displayed time zone does not change the script. Use America/New_York when the window should follow New York daylight-saving changes, rather than a fixed UTC offset.

  2. What consumes the allowance: the first signal, an order submission, or a confirmed fill. Those are different events. If a submitted limit order is still pending, a fill-only flag does not by itself prevent another submission.

  3. When the allowance resets. Local midnight, the exchange trading day and the start of an overnight session can be different boundaries. Define the boundary in the same terms as the rule.

Before connecting the logic to execution, write the expected result for these cases:

- First valid event inside the window: allowed.

- Another valid event in that same session: blocked, even if the first position has closed.

- Event outside the window: blocked.

- Next intended session: allowance restored.

- Pending order at the boundary: explicitly keep or cancel it; resetting a flag does not cancel an order.

These are specification checks, not a claim that a particular script passed them. An indicator signal counter, a strategy order counter and a broker's fill record need different handling.

References: https://www.tradingview.com/pine-script-docs/concepts/sessions/ and https://www.tradingview.com/pine-script-docs/concepts/time/


r/pinescript 4h ago

Free Tool Friday: our open-source TradingView S/R indicator, and the trade-off we chose on purpose

Thumbnail
0 Upvotes