HTF Candle Breakout Fibonacci LevelsThis indicator automatically plots Fibonacci retracement levels on a lower timeframe (LTF) after detecting a breakout candle on a selected higher timeframe (HTF).
๐ How It Works
When a candle on your selected HTF closes beyond the high or low of the previous candle, the indicator automatically draws Fibonacci levels on the LTF.
These levels remain visible until the next HTF candle is formed โ allowing you to trade retracements with contextual precision.
โธป
โ๏ธ Customization Options
From the indicator settings, you can modify:
โข The HTF candle timeframe (default is 1D)
โข Fibonacci levels and colors
โข Enable or disable โShow Only the Latest Levelsโ โ ideal for live trading to keep the chart clean and focused.
โธป
๐ช HTF Candles Preview
After applying the indicator, youโll see 3 vertical bars on the right edge of your LTF chart. These represent a live preview of the last three HTF candles and update in real-time.
If you prefer a cleaner chart, disable this feature via the โShow HTF Candlesโ toggle in the settings.
โธป
Feel free to reach out if you have any questions.
Milvetti
Strategy Builder With IndicatorsThis strategy script is designed for traders who enjoy building systems using multiple indicators.
Please note: This script does not include any built-in indicators. Instead, it works by referencing the plot outputs of the indicators youโve already added to your chart.
For example, if you add a MACD and an ATR indicator to your chart, you can assign their plot values as inputs in the settings panel of this strategy.
โข MACD as a trigger
โข ATR as a filter
How Filters Work
Filters check whether certain conditions are met before a trade can be opened. For instance, if you set a filter like ATR > 30, then no trade will be executed unless that condition is true โ even if the trigger fires.
All filters are linked, meaning every active filter must be satisfied for a trade to occur.
How Triggers Work
Triggers are what actually fire a trade signal โ such as a moving average crossover or RSI breaking above a specific level. Unlike filters, triggers are independent. Only one active trigger needs to be true for the trade to execute.
Thanks to its modular structure, this strategy can be used with any indicator of your choice.
โธป
Risk Management Features
In the settings, youโll find flexible options for:
โข Stop Loss (SL)
โข Trailing Stop Loss (TSL)
โข Multi Take-Profit (TP)
These features enhance trade safety and let you tailor your risk management.
SL types available:
โข Tick-based SL
โข Percent-based SL
โข ATR-based SL
Once you select your preferred SL type, you can fine-tune its distance using the offset field.
Trailing SL allows your stop to follow price as it moves in your favor โ helping to lock in profits.
Multi-TP lets you take profits at two different levels, helping you secure gains while leaving room for extended moves.
Breakeven option is also available to automatically move your SL to entry after reaching a profit threshold.
โธป
How to Build a Solid Strategy
Letโs break down a good setup into three key components:
1. Trend Filter
Avoid trading against the trend โ thatโs like swimming against the current.
Use a filter like:
โข Supertrend
โข Momentum indicators
โข Candlestick bias, etc.
Example: In this case, I used Supertrend and filtered for trades only if the price is above the uptrend line.
2. Trigger Condition
Once we confirm the trend is on our side, we need a trigger to execute at the right moment. This can be:
โข RSI cross
โข Candlestick patterns
โข Trendline breaks
โข Moving average crossovers, etc.
Example: I used RSI crossing above 50 as the entry trigger.
3. Risk Management
Even in the right trend at the right time โ anything can happen. Thatโs why you should always define Stop Loss and Take Profit levels.
โธป
And there you have it! Your strategy is ready to backtest, refine, and deploy with alerts for live trading.
Questions or suggestions? Feel free to reach out
Milvetti_Pineconnector_LibraryLibrary "Milvetti_Pineconnector_Library"
This library has methods that provide practical signal transmission for Pineconnector.Developed By Milvetti
buy(licenseId, symbol, risk, sl, tp, beTrigger, beOffset, trailTrig, trailDist, trailStep, atrTimeframe, atrTrigger, atrPeriod, atrMultiplier, atrShift, spread, accFilter, secret, comment)
โโCreate a buy order message
โโParameters:
โโโโ licenseId (string) : License Id. This is a unique identifier found in the Pineconnector Licensing Dashboard.
โโโโ symbol (string) : Symbol. Default is syminfo.ticker
โโโโ risk (float) : Risk. Function depends on the โVolume Typeโ selected in the EA
โโโโ sl (float) : StopLoss. Place stop-loss. Computation is based on the Target Type selected in the EA. Default is 0(inactive)
โโโโ tp (float) : TakeProfit. Place take-profit. Computation is based on the Target Type selected in the EA. Default is 0(inactive)
โโโโ beTrigger (float) : Breakeven will be activated after the position gains this number of pips. Ensure > 0
โโโโ beOffset (float) : Offset from entry price. 0 means the SL will be placed exactly at entry price. 1 means 1 pip above the entry price for buy trades and 1 pip below for sell trades.
โโโโ trailTrig (int) : Trailing stop-loss will be activated after a trade gains this number of pips. Default is 0(inactive)
โโโโ trailDist (int) : SL will be opened at traildist after trailtrig is met, even if you do not have a SL placed.. Default is 0(inactive)
โโโโ trailStep (int) : Moves trailing stop-loss once price moves to favourable by a specified number of pips. Default is 0(inactive)
โโโโ atrTimeframe (string) : ATR Trailing Stop will be based on the specified timeframe in minutes and will only update once per bar close. Default is Timeframe.Period
โโโโ atrTrigger (float) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default is 0(inactive)
โโโโ atrPeriod (int) : ATR averaging period. Default is 0
โโโโ atrMultiplier (float) : Multiple of ATR to utilise in the new SL computation. Default is 1
โโโโ atrShift (float) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default is 0
โโโโ spread (float) : Enter the position only if the spread is equal or less than the specified value in pips. Default is 0(inactive)
โโโโ accFilter (float) : Enter the position only if the account requirement is met. Default is 0(inactive)
โโโโ secret (string)
โโโโ comment (string) : Comment. Add a string into the orderโs comment section. Default is "Symbol+Timeframe"
sell(licenseId, symbol, risk, sl, tp, beTrigger, beOffset, trailTrig, trailDist, trailStep, atrTimeframe, atrTrigger, atrPeriod, atrMultiplier, atrShift, spread, accFilter, secret, comment)
โโCreate a buy order message
โโParameters:
โโโโ licenseId (string) : License Id. This is a unique identifier found in the Pineconnector Licensing Dashboard.
โโโโ symbol (string) : Symbol. Default is syminfo.ticker
โโโโ risk (float) : Risk. Function depends on the โVolume Typeโ selected in the EA
โโโโ sl (float) : StopLoss. Place stop-loss. Computation is based on the Target Type selected in the EA. Default is 0(inactive)
โโโโ tp (float) : TakeProfit. Place take-profit. Computation is based on the Target Type selected in the EA. Default is 0(inactive)
โโโโ beTrigger (float) : Breakeven will be activated after the position gains this number of pips. Ensure > 0
โโโโ beOffset (float) : Offset from entry price. 0 means the SL will be placed exactly at entry price. 1 means 1 pip above the entry price for buy trades and 1 pip below for sell trades.
โโโโ trailTrig (int) : Trailing stop-loss will be activated after a trade gains this number of pips. Default is 0(inactive)
โโโโ trailDist (int) : SL will be opened at traildist after trailtrig is met, even if you do not have a SL placed.. Default is 0(inactive)
โโโโ trailStep (int) : Moves trailing stop-loss once price moves to favourable by a specified number of pips. Default is 0(inactive)
โโโโ atrTimeframe (string) : ATR Trailing Stop will be based on the specified timeframe in minutes and will only update once per bar close. Default is Timeframe.Period
โโโโ atrTrigger (float) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default is 0(inactive)
โโโโ atrPeriod (int) : ATR averaging period. Default is 0
โโโโ atrMultiplier (float) : Multiple of ATR to utilise in the new SL computation. Default is 1
โโโโ atrShift (float) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default is 0
โโโโ spread (float) : Enter the position only if the spread is equal or less than the specified value in pips. Default is 0(inactive)
โโโโ accFilter (float) : Enter the position only if the account requirement is met. Default is 0(inactive)
โโโโ secret (string)
โโโโ comment (string) : Comment. Add a string into the orderโs comment section. Default is "Symbol+Timeframe"
buyLimit(licenseId, symbol, pending, risk, sl, tp, beTrigger, beOffset, trailTrig, trailDist, trailStep, atrTimeframe, atrTrigger, atrPeriod, atrMultiplier, atrShift, spread, accFilter, secret, comment)
โโCreate a buy limit order message
โโParameters:
โโโโ licenseId (string) : License Id. This is a unique identifier found in the Pineconnector Licensing Dashboard.
โโโโ symbol (string) : Symbol. Default is syminfo.ticker
โโโโ pending (float) : Computing pending order entry price. EA Options: Pips, Specified Price, Percentage
โโโโ risk (float) : Risk. Function depends on the โVolume Typeโ selected in the EA
โโโโ sl (float) : StopLoss. Place stop-loss. Computation is based on the Target Type selected in the EA. Default is 0(inactive)
โโโโ tp (float) : TakeProfit. Place take-profit. Computation is based on the Target Type selected in the EA. Default is 0(inactive)
โโโโ beTrigger (float) : Breakeven will be activated after the position gains this number of pips. Ensure > 0
โโโโ beOffset (float) : Offset from entry price. 0 means the SL will be placed exactly at entry price. 1 means 1 pip above the entry price for buy trades and 1 pip below for sell trades.
โโโโ trailTrig (int) : Trailing stop-loss will be activated after a trade gains this number of pips. Default is 0(inactive)
โโโโ trailDist (int) : SL will be opened at traildist after trailtrig is met, even if you do not have a SL placed.. Default is 0(inactive)
โโโโ trailStep (int) : Moves trailing stop-loss once price moves to favourable by a specified number of pips. Default is 0(inactive)
โโโโ atrTimeframe (string) : ATR Trailing Stop will be based on the specified timeframe in minutes and will only update once per bar close. Default is Timeframe.Period
โโโโ atrTrigger (float) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default is 0(inactive)
โโโโ atrPeriod (int) : ATR averaging period. Default is 0
โโโโ atrMultiplier (float) : Multiple of ATR to utilise in the new SL computation. Default is 1
โโโโ atrShift (float) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default is 0
โโโโ spread (float) : Enter the position only if the spread is equal or less than the specified value in pips. Default is 0(inactive)
โโโโ accFilter (float) : Enter the position only if the account requirement is met. Default is 0(inactive)
โโโโ secret (string)
โโโโ comment (string) : Comment. Add a string into the orderโs comment section. Default is "Symbol+Timeframe"
buyStop(licenseId, symbol, pending, risk, sl, tp, beTrigger, beOffset, trailTrig, trailDist, trailStep, atrTimeframe, atrTrigger, atrPeriod, atrMultiplier, atrShift, spread, accFilter, secret, comment)
โโCreate a buy stop order message
โโParameters:
โโโโ licenseId (string) : License Id. This is a unique identifier found in the Pineconnector Licensing Dashboard.
โโโโ symbol (string) : Symbol. Default is syminfo.ticker
โโโโ pending (float) : Computing pending order entry price. EA Options: Pips, Specified Price, Percentage
โโโโ risk (float) : Risk. Function depends on the โVolume Typeโ selected in the EA
โโโโ sl (float) : StopLoss. Place stop-loss. Computation is based on the Target Type selected in the EA. Default is 0(inactive)
โโโโ tp (float) : TakeProfit. Place take-profit. Computation is based on the Target Type selected in the EA. Default is 0(inactive)
โโโโ beTrigger (float) : Breakeven will be activated after the position gains this number of pips. Ensure > 0
โโโโ beOffset (float) : Offset from entry price. 0 means the SL will be placed exactly at entry price. 1 means 1 pip above the entry price for buy trades and 1 pip below for sell trades.
โโโโ trailTrig (int) : Trailing stop-loss will be activated after a trade gains this number of pips. Default is 0(inactive)
โโโโ trailDist (int) : SL will be opened at traildist after trailtrig is met, even if you do not have a SL placed.. Default is 0(inactive)
โโโโ trailStep (int) : Moves trailing stop-loss once price moves to favourable by a specified number of pips. Default is 0(inactive)
โโโโ atrTimeframe (string) : ATR Trailing Stop will be based on the specified timeframe in minutes and will only update once per bar close. Default is Timeframe.Period
โโโโ atrTrigger (float) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default is 0(inactive)
โโโโ atrPeriod (int) : ATR averaging period. Default is 0
โโโโ atrMultiplier (float) : Multiple of ATR to utilise in the new SL computation. Default is 1
โโโโ atrShift (float) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default is 0
โโโโ spread (float) : Enter the position only if the spread is equal or less than the specified value in pips. Default is 0(inactive)
โโโโ accFilter (float) : Enter the position only if the account requirement is met. Default is 0(inactive)
โโโโ secret (string)
โโโโ comment (string) : Comment. Add a string into the orderโs comment section. Default is "Symbol+Timeframe"
sellLimit(licenseId, symbol, pending, risk, sl, tp, beTrigger, beOffset, trailTrig, trailDist, trailStep, atrTimeframe, atrTrigger, atrPeriod, atrMultiplier, atrShift, spread, accFilter, secret, comment)
โโCreate a sell limit order message
โโParameters:
โโโโ licenseId (string) : License Id. This is a unique identifier found in the Pineconnector Licensing Dashboard.
โโโโ symbol (string) : Symbol. Default is syminfo.ticker
โโโโ pending (float) : Computing pending order entry price. EA Options: Pips, Specified Price, Percentage
โโโโ risk (float) : Risk. Function depends on the โVolume Typeโ selected in the EA
โโโโ sl (float) : StopLoss. Place stop-loss. Computation is based on the Target Type selected in the EA. Default is 0(inactive)
โโโโ tp (float) : TakeProfit. Place take-profit. Computation is based on the Target Type selected in the EA. Default is 0(inactive)
โโโโ beTrigger (float) : Breakeven will be activated after the position gains this number of pips. Ensure > 0
โโโโ beOffset (float) : Offset from entry price. 0 means the SL will be placed exactly at entry price. 1 means 1 pip above the entry price for buy trades and 1 pip below for sell trades.
โโโโ trailTrig (int) : Trailing stop-loss will be activated after a trade gains this number of pips. Default is 0(inactive)
โโโโ trailDist (int) : SL will be opened at traildist after trailtrig is met, even if you do not have a SL placed.. Default is 0(inactive)
โโโโ trailStep (int) : Moves trailing stop-loss once price moves to favourable by a specified number of pips. Default is 0(inactive)
โโโโ atrTimeframe (string) : ATR Trailing Stop will be based on the specified timeframe in minutes and will only update once per bar close. Default is Timeframe.Period
โโโโ atrTrigger (float) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default is 0(inactive)
โโโโ atrPeriod (int) : ATR averaging period. Default is 0
โโโโ atrMultiplier (float) : Multiple of ATR to utilise in the new SL computation. Default is 1
โโโโ atrShift (float) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default is 0
โโโโ spread (float) : Enter the position only if the spread is equal or less than the specified value in pips. Default is 0(inactive)
โโโโ accFilter (float) : Enter the position only if the account requirement is met. Default is 0(inactive)
โโโโ secret (string)
โโโโ comment (string) : Comment. Add a string into the orderโs comment section. Default is "Symbol+Timeframe"
sellStop(licenseId, symbol, pending, risk, sl, tp, beTrigger, beOffset, trailTrig, trailDist, trailStep, atrTimeframe, atrTrigger, atrPeriod, atrMultiplier, atrShift, spread, accFilter, secret, comment)
โโCreate a sell stop order message
โโParameters:
โโโโ licenseId (string) : License Id. This is a unique identifier found in the Pineconnector Licensing Dashboard.
โโโโ symbol (string) : Symbol. Default is syminfo.ticker
โโโโ pending (float) : Computing pending order entry price. EA Options: Pips, Specified Price, Percentage
โโโโ risk (float) : Risk. Function depends on the โVolume Typeโ selected in the EA
โโโโ sl (float) : StopLoss. Place stop-loss. Computation is based on the Target Type selected in the EA. Default is 0(inactive)
โโโโ tp (float) : TakeProfit. Place take-profit. Computation is based on the Target Type selected in the EA. Default is 0(inactive)
โโโโ beTrigger (float) : Breakeven will be activated after the position gains this number of pips. Ensure > 0
โโโโ beOffset (float) : Offset from entry price. 0 means the SL will be placed exactly at entry price. 1 means 1 pip above the entry price for buy trades and 1 pip below for sell trades.
โโโโ trailTrig (int) : Trailing stop-loss will be activated after a trade gains this number of pips. Default is 0(inactive)
โโโโ trailDist (int) : SL will be opened at traildist after trailtrig is met, even if you do not have a SL placed.. Default is 0(inactive)
โโโโ trailStep (int) : Moves trailing stop-loss once price moves to favourable by a specified number of pips. Default is 0(inactive)
โโโโ atrTimeframe (string) : ATR Trailing Stop will be based on the specified timeframe in minutes and will only update once per bar close. Default is Timeframe.Period
โโโโ atrTrigger (float) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default is 0(inactive)
โโโโ atrPeriod (int) : ATR averaging period. Default is 0
โโโโ atrMultiplier (float) : Multiple of ATR to utilise in the new SL computation. Default is 1
โโโโ atrShift (float) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default is 0
โโโโ spread (float) : Enter the position only if the spread is equal or less than the specified value in pips. Default is 0(inactive)
โโโโ accFilter (float) : Enter the position only if the account requirement is met. Default is 0(inactive)
โโโโ secret (string)
โโโโ comment (string) : Comment. Add a string into the orderโs comment section. Default is "Symbol+Timeframe"
Milvetti_TraderPost_LibraryLibrary "Milvetti_TraderPost_Library"
This library has methods that provide practical signal transmission for traderpost.Developed By Milvetti
cancelOrders(symbol)
โโThis method generates a signal in JSON format that cancels all orders for the specified pair. (If you want to cancel stop loss and takeprofit orders together, use the โexitOrderโ method.
โโParameters:
โโโโ symbol (string)
exitOrders(symbol)
โโThis method generates a signal in JSON format that close all orders for the specified pair.
โโParameters:
โโโโ symbol (string)
createOrder(ticker, positionType, orderType, entryPrice, signalPrice, qtyType, qty, stopLoss, stopType, stopValue, takeProfit, profitType, profitValue, timeInForce)
โโThis function is designed to send buy or sell orders to traderpost. It can create customized orders by flexibly specifying parameters such as order type, position type, entry price, quantity calculation method, stop-loss, and take-profit. The purpose of the function is to consolidate all necessary details for opening a position into a single structure and present it as a structured JSON output. This format can be sent to trading platforms via webhooks.
โโParameters:
โโโโ ticker (string) : The ticker symbol of the instrument. Default value is the current chart's ticker (syminfo.ticker).
โโโโ positionType (string) : Determines the type of order (e.g., "long" or "buy" for buying and "short" or "sell" for selling).
โโโโ orderType (string) : Defines the order type for execution. Options: "market", "limit", "stop". Default is "market"
โโโโ entryPrice (float) : The price level for entry orders. Only applicable for limit or stop orders. Default is 0 (market orders ignore this).
โโโโ signalPrice (float) : Optional. Only necessary when using relative take profit or stop losses, and the broker does not support fetching quotes to perform the calculation. Default is 0
โโโโ qtyType (string) : Determines how the order quantity is calculated. Options: "fixed_quantity", "dollar_amount", "percent_of_equity", "percent_of_position".
โโโโ qty (float) : Quantity value. Can represent units of shares/contracts or a dollar amount, depending on qtyType.
โโโโ stopLoss (bool) : Enable or disable stop-loss functionality. Set to `true` to activate.
โโโโ stopType (string) : Specifies the stop-loss calculation type. Options: percent, "amount", "stopPrice", "trailPercent", "trailAmount". Default is "stopPrice"
โโโโ stopValue (float) : Stop-loss value based on stopType. Can be a percentage, dollar amount, or a specific stop price. Default is "stopPrice"
โโโโ takeProfit (bool) : Enable or disable take-profit functionality. Set to `true` to activate.
โโโโ profitType (string) : Specifies the take-profit calculation type. Options: "percent", "amount", "limitPrice". Default is "limitPrice"
โโโโ profitValue (float) : Take-profit value based on profitType. Can be a percentage, dollar amount, or a specific limit price. Default is 0
โโโโ timeInForce (string) : The time in force for your order. Options: day, gtc, opg, cls, ioc and fok
โโReturns: Return result in Json format.
addTsl(symbol, stopType, stopValue, price)
โโThis method adds trailing stop loss to the current position. โPriceโ is the trailing stop loss starting level. You can leave price blank if you want it to start immediately
โโParameters:
โโโโ symbol (string)
โโโโ stopType (string) : Specifies the trailing stoploss calculation type. Options: "trailPercent", "trailAmount".
โโโโ stopValue (float) : Stop-loss value based on stopType. Can be a percentage, dollar amount.
โโโโ price (float) : The trailing stop loss starting level. You can leave price blank if you want it to start immediately. Default is current price.
RSI Accumulation/Distribution [M]Hello everyone,
After my long tests, I observed that the rate of change of direction of the price was high after the periods when the RSI spent a long time outside the band. As a result of my observations, I prepared this indicator.
This indicator shows you the accumulation and distribution areas that occur outside the rsi band.
There are 3 different levels available.
Level 1 = 5 Bars
Level 2 = 7 Bars
Level 3 = 9 Bars
For example, if the RSI spends more than 9 bars below the 30 level or above the 70 level, it will paint that area red. Levels can be changed from the indicator settings. The rsi is smoothed with simple moving average to reduce fake signals.
Using the RSI A/D indicator with different indicators or patterns will increase your success rate.
Examples:




