{placeholder_title}
, where placeholder_title
is the name of the placeholder to access and {}
makes sure the string is recognized as a placeholder.
With scripted strategies, placeholders allow accessing market data such as ohlc prices, volume, but also strategy data such as net profit, winrate, entry prices…etc.
Placeholder | Description |
---|---|
{open} | Open price of the bar |
{high} | High price of the bar |
{low} | Low price of the bar |
{close} | Close price of the bar |
{hl2} | Median price (high + low) / 2 |
{ohlc4} | Average price (open + high + low + close) / 4 |
{hlc3} | Typical price (high + low + close) / 3 |
{hlcc4} | Weighted average of hlc prices (high + low + 2 * close) / 4 |
{volume} | Volume for the bar |
{range} | Difference between High and Low prices |
{tr} | True Range |
Placeholder | Description |
---|---|
{barindex} | Index of the current bar |
{last_barindex} | Index of the most recent bar |
{second} | Current bar second |
{minute} | Current bar minute |
{hour} | Current bar hour |
{dayofweek} | Current bar day of the week ranging from 1 to 7, with 1 for sunday |
{dayofmonth} | Current bar day of the month |
{weekofyear} | Current bar week of the year |
{month} | Current bar month of the year |
{year} | Current bar year (with timezone) |
{unix_ts} | Unix timestamp of the bar |
{timeframe} | Chart timeframe in minutes |
{hhmm-hhmm} | Session placeholder, True when the bar is located within the specific session interval, see here for more information |
{dayofweek}
returns the day based on the time of the bar’s open. For overnight sessions (e.g. EURUSD, where Monday session starts on Sunday, 17:00) this value can be lower by 1 than the day of the trading day.Timezone
dropdown setting, defining the timezone using UTC. Default value is exchange
, which uses the exchange timezones to get the value of the time related placeholders.
{hhmm-hhmm}
, where hh
is the hour and mm
the minute.
The value of this placeholder will be True
when the bar time is located between the start time {hhmm-
and end time -hhmm}
.
For example, if we want to detect when the bar is located in the session starting at 14:30 and ending at 16:45 we would simply use:
Placeholder | Description |
---|---|
{entry_price} | Average entry price of the current position |
{net_profit} | Total net profit from all closed trades |
{equity} | Current equity including open trades |
{open_profit} | Unrealized profit/loss of open trades |
{gross_profit} | Total gross profit from winning trades |
{gross_loss} | Total gross loss from losing trades |
{gross_profit_percent} | Gross profit expressed as a percentage |
{gross_loss_percent} | Gross loss expressed as a percentage |
{profit_factor} | Ratio of gross profit to gross loss |
{winrate} | Percentage of closed trades that were wins |
{closed_trades} | Number of closed trades |
{open_trades} | Number of currently open trades |
{win_trades} | Number of winning closed trades |
{loss_trades} | Number of losing closed trades |
{avg_trade} | Average profit/loss per trade |
{avg_winning_trade} | Average profit of winning trades |
{avg_losing_trade} | Average loss of losing trades |
{max_drawdown} | Maximum drawdown in account value |
{max_drawdown_percent} | Max drawdown expressed as a percentage |
{max_runup} | Maximum runup in account value |
{max_runup_percent} | Max runup expressed as a percentage |
{position_size} | Current position size |
{external1}
{external2}
{external3}
=
, then followed by the condition we want to assign to this placeholder, for example {my_placeholder} = {close} > {open}
Let’s take a more complex example and say we want to go long on a new bullish fair value gap while we also had one on the previous bar.
Doing this could involve a long and messy script, to make things easier we can create an UDP that refers to the condition of a bullish fair value gaps:
Placeholder | Description |
---|---|
{bullish_confirmation} | True on a new normal bullish confirmation signal |
{bullish_confirmation+} | True on a new strong bullish confirmation signal |
{bullish_confirmation_any} | True on a any new bullish confirmation signal |
{bullish_confirmation_turn+} | True when a normal bullish confirmation signal turns strong |
{bearish_confirmation} | True on a new normal bearish confirmation signal |
{bearish_confirmation+} | True on a new strong bearish confirmation signal |
{bearish_confirmation_any} | True on any new bearish confirmation signal |
{bearish_confirmation_turn+} | True when a normal bearish confirmation signal turns strong |
{bullish_contrarian} | True on a new normal bullish contrarian signal |
{bullish_contrarian+} | True on a new strong bullish contrarian signal |
{bullish_contrarian_any} | True on any new bullish contrarian signal |
{bearish_contrarian} | True on a new normal bearish contrarian signal |
{bearish_contrarian+} | True on a new strong bearish contrarian signal |
{bearish_contrarian_any} | True on any new bearish contrarian signal |
{exit_buy} | True on a new exit buy signal |
{exit_sell} | True on a new exit sell signal |
{bullish_smart_trail} | True if Smart Trail is up-trending |
{bearish_smart_trail} | True if Smart Trail is down-trending |
{switch_bullish_smart_trail} | True if Smart Trail switches to bullish |
{switch_bearish_smart_trail} | True if Smart Trail switches to bearish |
{price_above_rzr1} | True if the closing price is above the lower Reversal Zones resistance R1 |
{price_below_rzs1} | True if the closing price is below the upper Reversal Zones support S1 |
{price_co_rzr1} | True if the closing price cross over the lower Reversal Zones resistance R1 |
{price_cu_rzs1} | True if the closing price cross under the upper Reversal Zones support S1 |
{bullish_catcher} | True if Trend Catcher is up-trending |
{bearish_catcher} | True if Trend Catcher is down-trending |
{switch_bullish_catcher} | True if Trend Catcher switches to bullish |
{switch_bearish_catcher} | True if Trend Catcher switches to bearish |
{bullish_tracer} | True if Trend Tracer is up-trending |
{bearish_tracer} | True if Trend Tracer is down-trending |
{switch_bullish_tracer} | True if Trend Tracer switches to bullish |
{switch_bearish_tracer} | True if Trend Tracer switches to bearish |
{bullish_neo} | True if Neo Cloud is up-trending |
{bearish_neo} | True if Neo Cloud is down-trending |
{switch_bullish_neo} | True if Neo Cloud switches to bullish |
{switch_bearish_neo} | True if Neo Cloud switches to bearish |
{confirmation_uptrend} | True when confirmation signal indicates an uptrend |
{confirmation_downtrend} | True when confirmation signal indicates a downtrend |
{contrarian_uptrend} | True when contrarian signal indicates an uptrend |
{contrarian_downtrend} | True when contrarian signal indicates a downtrend |
{trend_strength_trending} | True when trend strength indicates a trending market (above 50) |
{trend_strength_ranging} | True when trend strength indicates a ranging market (under 50) |
{confirmation_exits} | True when confirmation-based exit condition is met |
{contrarian_exits} | True when contrarian-based exit condition is met |
{price_cross_rz_avg} | True when price crosses the average of The Reversal Zones |
Placeholder | Description |
---|---|
{bullish_choch} | True when a bullish Change of Character (CHoCH) occurs |
{bearish_choch} | True when a bearish Change of Character (CHoCH) occurs |
{bullish_bos} | True when a bullish Break of Structure (BOS) occurs |
{bearish_bos} | True when a bearish Break of Structure (BOS) occurs |
{bullish_trend} | True when market structure trend is bullish |
{bearish_trend} | True when market structure trend is bearish |
{bullish_ob_exited} | True when price exits a bullish order block |
{bearish_ob_exited} | True when price exits a bearish order block |
{bullish_new_fvg} | True on detection of a new bullish Fair Value Gap (FVG) |
{bearish_new_fvg} | True on detection of a new bearish Fair Value Gap (FVG) |
{bullish_fvg_mitigated} | True when bullish FVG is mitigated |
{bearish_fvg_mitigated} | True when bearish FVG is mitigated |
{bullish_fvg_entered} | True when price enters bullish FVG |
{bearish_fvg_entered} | True when price enters bearish FVG |
{bullish_fvg_within} | True when price is within bullish FVG |
{bearish_fvg_within} | True when price is within bearish FVG |
{bullish_fvg_exited} | True when price exits bullish FVG |
{bearish_fvg_exited} | True when price exits bearish FVG |
{bullish_new_ifvg} | True on detection of a new bullish Inverse FVG |
{bearish_new_ifvg} | True on detection of a new bearish Inverse FVG |
{bullish_ifvg_mitigated} | True when bullish Inverse FVG is mitigated |
{bearish_ifvg_mitigated} | True when bearish Inverse FVG is mitigated |
{bullish_ifvg_entered} | True when price enters bullish Inverse FVG |
{bearish_ifvg_entered} | True when price enters bearish Inverse FVG |
{bullish_ifvg_within} | True when price is within bullish Inverse FVG |
{bearish_ifvg_within} | True when price is within bearish Inverse FVG |
{bullish_ifvg_exited} | True when price exits bullish Inverse FVG |
{bearish_ifvg_exited} | True when price exits bearish Inverse FVG |
{bullish_new_dfvg} | True on detection of a new bullish Double FVG |
{bearish_new_dfvg} | True on detection of a new bearish Double FVG |
{bullish_dfvg_mitigated} | True when bullish Double FVG is mitigated |
{bearish_dfvg_mitigated} | True when bearish Double FVG is mitigated |
{bullish_dfvg_entered} | True when price enters bullish Double FVG |
{bearish_dfvg_entered} | True when price enters bearish Double FVG |
{bullish_dfvg_within} | True when price is within bullish Double FVG |
{bearish_dfvg_within} | True when price is within bearish Double FVG |
{bullish_dfvg_exited} | True when price exits bullish Double FVG |
{bearish_dfvg_exited} | True when price exits bearish Double FVG |
{bullish_new_vi} | True on detection of a new bullish Volume Imbalance |
{bearish_new_vi} | True on detection of a new bearish Volume Imbalance |
{bullish_vi_mitigated} | True when bullish Volume Imbalance is mitigated |
{bearish_vi_mitigated} | True when bearish Volume Imbalance is mitigated |
{bullish_vi_entered} | True when price enters bullish Volume Imbalance |
{bearish_vi_entered} | True when price enters bearish Volume Imbalance |
{bullish_vi_within} | True when price is within bullish Volume Imbalance |
{bearish_vi_within} | True when price is within bearish Volume Imbalance |
{bullish_vi_exited} | True when price exits bullish Volume Imbalance |
{bearish_vi_exited} | True when price exits bearish Volume Imbalance |
{bullish_new_og} | True on detection of a new bullish Opening Gap |
{bearish_new_og} | True on detection of a new bearish Opening Gap |
{bullish_og_mitigated} | True when bullish Opening Gap is mitigated |
{bearish_og_mitigated} | True when bearish Opening Gap is mitigated |
{bullish_og_entered} | True when price enters bullish Opening Gap |
{bearish_og_entered} | True when price enters bearish Opening Gap |
{bullish_og_within} | True when price is within bullish Opening Gap |
{bearish_og_within} | True when price is within bearish Opening Gap |
{bullish_og_exited} | True when price exits bullish Opening Gap |
{bearish_og_exited} | True when price exits bearish Opening Gap |
{bullish_liquidity_grab} | True on detection of a bullish liquidity grab |
{bearish_liquidity_grab} | True on detection of a bearish liquidity grab |
{bullish_trendline_break} | True on a bullish trendline break |
{bearish_trendline_break} | True on a bearish trendline break |
Placeholder | Description |
---|---|
{regular_bullish_hyperwave_signal} | True on a new regular bullish HyperWave signal |
{regular_bearish_hyperwave_signal} | True on a new regular bearish HyperWave signal |
{oversold_bullish_hyperwave_signal} | True on a new oversold bullish HyperWave signal |
{overbought_bearish_hyperwave_signal} | True on a new overbought bearish HyperWave signal |
{hyperwave_co_80} | True when HyperWave crosses over 80 |
{hyperwave_cu_20} | True when HyperWave crosses under 20 |
{hyperwave_co_50} | True when HyperWave crosses over 50 |
{hyperwave_cu_50} | True when HyperWave crosses under 50 |
{hyperwave_above_80} | True when HyperWave is above 80 |
{hyperwave_below_20} | True when HyperWave is below 20 |
{hyperwave_above_50} | True when HyperWave is above 50 |
{hyperwave_below_50} | True when HyperWave is below 50 |
{moneyflow_co_50} | True when Money Flow crosses over 50 |
{moneyflow_cu_50} | True when Money Flow crosses under 50 |
{moneyflow_above_50} | True when Money Flow is above 50 |
{moneyflow_below_50} | True when Money Flow is below 50 |
{new_bullish_overflow} | True on a new bullish Overflow signal |
{new_bearish_overflow} | True on a new bearish Overflow signal |
{bullish_overflow} | True if bullish Overflow is active |
{bearish_overflow} | True if bearish Overflow is active |
{reversal_any_up} | True on any new bullish reversal signal |
{reversal_any_down} | True on any new bearish reversal signal |
{bullish_divergence} | True on a new bullish divergence |
{bearish_divergence} | True on a new bearish divergence |
{weak_bullish_confluence} | True on a new weak bullish confluence |
{weak_bearish_confluence} | True on a new weak bearish confluence |
{strong_bullish_confluence} | True on a new strong bullish confluence |
{strong_bearish_confluence} | True on a new strong bearish confluence |