Scalping Trading System ALERT Crypto and StocksThis is the alert version of the strategy with the same name.
Indicators
SImple Moving Average
Exponential Moving Average
Keltner Channels
MACD Histogram
Stochastics
Rules for entry
long= Close of the candle bigger than both moving averages and close of the candle is between the top and bot levels from Keltner . At the same time the macd histogram is negative and stochastic is below 50.
short= Close of the candle smaller than both moving averages and close of the candle is between the top and bot levels from Keltner . At the same time the macd histogram is positive and stochastic is above 50.
Rules for exit
We exit when we meet an opposite reverse order.
This strategy has no risk management inside, so use it with caution !
Cerca negli script per "alert"
Multi-Function RSI(MTF, divergence, signal and alert)Japanese below / 日本語説明は下記
Overview
Multi-function RSI indicator with functions below.
1.MTF with display timeframe control
2.Auto divergence drawing incl. hidden divergence
3.Signal when RSI crosses over upper band/crosses under lower band
4.Color background when MTF RSI crosses over/under lower band
5.Alert when RSI crosses over upper band/crosses under lower bands
Please see the details below.
Functions:
1.MTF with display timeframe control
You can display daily, 4hour or 1 hour RSI or all of them as upper timeframe MTF RSI.
How is it different from other MTF indicators?
Problems with other MTF RSI indicators are;
-If you set higher timeframe RSI, it will also be shown on further higher timeframes.
i.e. If you set 4hour chart’s RSI on 1 hour or lower time frame charts, it will also appear on daily and weekly chart, which is not necessary.
To tackle these problems, this indicator has incorporated functions below.
-To show MTF RSI on timeframe lower than the upper timeframe you set as MTF timeframe.
For example, if you select daily timeframe for MTF RSI , the RSI will be shown only on 4 hour or lower timeframes(1H, 30M, 15M, 5M, 1M).
Left: 4hour chart, Middle: Daily chart, Right: Weekly chart
If you look at 4hour chart, daily chart’s RSI is shown(pale blue and orange) but weekly chart does not show daily chart’s RSI.
2.Auto divergence drawing incl. hidden divergence
Regular divergence line and hidden divergence line will be automatically drawn for current timeframe RSI as per the logic below.
Bearish : When two consecutive pivot highs go up but RSI values corresponding to each high go down.
Bullish: When two consecutive pivot lows go down but RSI values corresponding to each low go up.
Pivot highs(lows) are identified when those are preceded by n lower highs(lows) and proceeded by n lower highs(lows).
* n is parameterized.
See the diagram below.
Bearish : When two consecutive pivot highs go down but RSI values corresponding to each highs go up.
Bullish : When two consecutive pivot lows go up but RSI values corresponding to each low go down.
3.Signal when RSI crossing upper/lower bands
Signal will be shown when;
-RSI(current timeframe) crosses over upper band
-RSI(current timeframe) crosses under lower band
Example:
Purple triangle is signals.
4.Color background when MTF RSI crosses over/under lower band
Background color can be applied when MTF RSI crosses over upper band/under lower band.
Example:
Pale purple is daily RSI on 4 hour chart. Background color applied while daily RSI is outside upper/lower bands.
5.Alert when RSI crosses over upper band/under lower band
Alert can be set when;
-RSI crosses over upper band
-RSI crosses under lower band
How to use this indicator?
This indicator is paid indicator and invited-only indicator.
Please contact me via private chat or follow links in my signature so that I can grant the access right to the indicator.
Comment section is only for comments on the indicator or updates. Please refrain from contacting me using comments to follow TradingView house rules.
———————————————————————————————————————
多機能RSIインジケーターです。以下の機能が搭載されています。
1.マルチタイムフレーム機能(表示時間足制御機能付き)
2.ダイバージェンス自動描画機能(ヒドゥンダイバージェンス対応)
3.RSIがアッパーバンド、ロワーバンドとクロスした時にシグナル表示
4.上位足RSI(MTF RSI)がアッパーバンドより上にある時、ロワーバンドより下にある時に背景をハイライト
5.RSIがアッパーバンド、ロワーバンドとクロスした時にアラート設定
機能詳細は以下の通りです。
機能詳細
1.マルチタイムフレーム機能(表示時間足制御機能付き)
日足、4時間足、1時間足のいずれか、もしくは全てをRSIをマルチタイムフレームRSIとして表示することができます。(不要な場合は非表示可能)
他のマルチタイムフレームRSIとの違い
他のマルチタイムフレームRSIのインジケーターでは、以下の問題に直面します。
・上位足のRSIを表示すると、さらに上位足でもそのRSIが表示され見にくくなる。
例: 4時間足のRSIを下位足で表示可能な様に設定すると、日足や週足でも表示され、チャートが見にくくなる。
この問題に対して、このインジケーターでは、
・上位足のRSIを表示する時間軸を制御することで上位足で不必要な情報を表示させない。
という機能を加えることでこの問題を解決しています。
具体的には、マルチタイムフレーム用に選択した上位足のタイムフレームより小さいタイムフレームでのみ上位足のRSIが表示されるようになっています。
例えば、上位足として日足を選択した場合、日足のRSIは4時間足、1時間足、30分足、15分足、5分足、1分足にのみ表示されます。
<サンプルチャート>
左から4時間足、日足、週足です。
4時間足では日足のRSI(薄いパープルのライン)が表示されていますが、週足には表示されません。これはオシレーターが表示される時間軸を裏側のロジックで制御しているためです。
2.ダイバージェンス自動描画機能(ヒドゥンダイバージェンス対応)
以下のロジックに基づきダイバージェンスを自動描画します。(不要な場合は非表示可能)
<通常のダイバージェンス>
下降示唆:2つの連続する高値(*)が切り上げられているが、 それぞれの高値に対応するRSIの値は切り下げている場合
上昇示唆:2つの連続する安値(*)が切り下がっているが、 それぞれの安値に対応するRSIの値は切り上がっている場合
*高値(安値)は、左右n本(**)ずつのローソク足の高値(安値)より高い(低い)高値(安値)をピボットハイ・ローとして算出しています。
** nはユーザ設定値です。
<例: ダイバージェンス>
高値PH1はPH1のローソクの高値より左側にn個のより低い高値、右側にn個のより低い高値があった場合に高値として認識されます。
上記の例では高値がPH2>PH1と切り上がっていますが、対応するRSIの値はvalue2
下降継続示唆:2つの連続する高値(*)が切り下がっているが、 それぞれの高値に対応するRSIの値は切り上がっている場合
上昇継続示唆:2つの連続する安値(*)が切り上がっているが、 それぞれの安値に対応するRSIの値は切り下がっている場合
言うまでもないことですが、ダイバージェンスが出たから逆張り、などの安易な発想は避けるべきです。
環境認識の一つの要素として見るべき指標でしょう。
3.RSIがアッパーバンドを上抜いた時、ロワーバンドを下抜いた時にシグナル表示
アッパーバンド(初期値70)とロワーバンド(初期値30)の数値は変更可能です。
サンプルチャート:
4.上位足RSI(MTF RSI)がアッパーバンドより上にある時、ロワーバンドより下にある時に背景をハイライト
サンプルチャート:
日足のRSI(薄いパープルのライン)がアッパーラインより上にある時に背景がグレーがかっています。
このように上位足のRSIの状況を視覚的に認識したい時に役立つでしょう。
日足RSIラインは非表示にすることができますので、背景色だけ表示しておいて、背景に色が付き、かつダイバージェンスも出たら反転を警戒といった状況判断が可能です。
5.RSIがアッパーバンド、ロワーバンドとクロスした時にアラート設定
アラートを設定したいタイムフレームを開いた状態で、アラート設定の画面を開き以下の条件を選択することができます。
・RSIがアッパーバンドを上抜いた時
・RSIがロワーバンドを下抜いた時
インジケーターの使用について
当インジケーターは招待制インジケーター(有料)となっています。
使用を希望される方はプライベートチャットや下記リンクのDMでご連絡ください。
このページのコメント欄はインジケーターそのものに対するコメントやアップデートの記載のためのものとなっております。Tradingviewのハウスルールを守るためにもコメント欄からの連絡はご遠慮ください。
MACD oscillator with EMA alert version 4HThis is the study/indicator alert version of the macd + ema strategy.
The strategy details are the following :
Is a simple, yet efficient strategy, which is made from a combination of an oscillator and a moving average.
Its setup for 4h candles with the current settings, however it can be adapted to other different timeframes.
It works nicely ,beating the buy and hold for both BTC and ETH over the last 3 years.
As well with some optimizations and modifications it can be adapted to futures market, indexes(NASDAQ, NIFTY etc), forex( GBPUSD ), stocks and so on.
Components:
MACD
EMA
Time condition
Long/short option
For long/exit short we enter when we are above the ema , histogram is positive and current candle is higher than previous.
For short /exit long , when close below ema , histo negative and current candles smaller than previous
If you have any questions please let me know !
Multi-Function Stochastic(MTF, divergence, signal and alert)Japanese below / 日本語説明は下記
Overview
Multi-function Stochastic indicator with functions below.
1.MTF with display timeframe control
2.Auto divergence drawing incl. hidden divergence
3.Signal when % K crosses over %D incl. MTF %K and %D
4.Alert when % K crosses over %D
Please see the details below.
Functions:
1.MTF with display timeframe control
You can select one upper timeframe from monthly, weekly, daily, 4hour, 1hour, 30mins, 15mins, 5mins to display upper timeframe’s Stochastic as MTF Stochastic.
How is it different from other MTF indicators?
Problems with other MTF Stochastic indicators are;
-If you set higher timeframe Stochastic, it will also be shown on further higher time frames.
i.e. If you set 4hour chart’s Stochastic on 1 hour or lower time frame charts, it will also appear on daily and weekly chart, which is not necessary.
To tackle these problems, this indicator has incorporated functions below.
-To show MTF Stochastic on timeframe lower than the upper timeframe you set as MTF timeframe.
For example, if you select daily timeframe for MTF Stochastic , the Stochastic will be shown only on 4 hour or lower timeframes(1H, 30M, 15M, 5M, 1M).
Left: 4hour chart, Middle: Daily chart, Right: Weekly chart
If you look at 4hour chart, daily chart’s Stochastic is shown(pale blue and orange) but weekly chart does not show daily chart’s Stochastic.
2.Auto divergence drawing incl. hidden divergence
Divergence line and hidden divergence line will be automatically drawn for the current timeframe Stochastic as per the logic below.
Bearish : When two consecutive pivot highs go up but %K values corresponding to each high go down.
Bullish: When two consecutive pivot lows go down but %K values corresponding to each low go up.
Pivot highs(lows) are identified when those are preceded by n lower highs(lows) and proceeded by n lower highs(lows).
* n is parameterized.
See the diagram below.
Bearish : When two consecutive pivot highs go down but %K values corresponding to each highs go up.
Bullish : When two consecutive pivot lows go up but %K values corresponding to each low go down.
3.Signal when % K crossing %D
Signal will be shown when;
-%K crosses over %D below lower band
-%K crosses under %D above upper band
-%K(MTF) crosses over %D(MTF) below lower band
-%K(MTF) crosses under %D(MTF) above upper band
4.Alert when % K crossing %D
Alert can be set when;
-%K crosses over %D below lower band
-%K crosses under %D above upper band
How to use this indicator?
This indicator is paid indicator and invited-only indicator.
Please contact me via private chat or follow links in my signature so that I can grant the access right to the indicator.
Comment section is only for comments on the indicator or updates. Please refrain from contacting me using comments to follow TradingView house rules.
———————————————————————————————————————
多機能ストキャスティクスインジケーターです。以下の機能が搭載されています。
1.マルチタイムフレーム機能(表示時間足制御機能付き)
2.ダイバージェンス自動描画機能(ヒドゥンダイバージェンス対応)
3.%Kが%Dをクロスした時にシグナル表示(MTFの%Kと%Dでも同様)
4.%Kが%Dをクロスした時にアラート設定可能
機能詳細は以下の通りです。
機能詳細
1.マルチタイムフレーム機能(表示時間軸制御機能付き)
月足、週足、日足、4時間足、1時間足、30分足、15分足、5分足の中から一つを選択し、上位足のストキャスティクスとして表示することができます。(不要な場合は非表示可能)
他のマルチタイムフレームストキャスティクスとの違い
他のマルチタイムフレームストキャスティクスのインジケーターでは、以下の問題に直面します。
・上位足のストキャスティクスを表示すると、さらに上位足でもそのストキャスティクスが表示され見にくくなる。
例: 4時間足のストキャスティクスを下位足で表示可能な様に設定すると、日足や週足でも表示され、チャートが見にくくなる。
この問題に対して、このインジケーターでは、
・上位足のストキャスティクスを表示する時間軸を制御することで上位足で不必要な情報を表示させない。
という機能を加えることでこの問題を解決しています。
具体的には、マルチタイムフレーム用に選択した上位足のタイムフレームより小さいタイムフレームでのみ上位足のストキャスティクスが表示されるようになっています。
例えば、上位足として日足を選択した場合、日足のストキャスティクスは4時間足、1時間足、30分足、15分足、5分足、1分足にのみ表示されます。
<サンプルチャート>
左から4時間足、日足、週足です。
4時間足では日足のストキャスティクスが表示されていますが、週足には表示されません。
2.ダイバージェンス自動描画機能(ヒドゥンダイバージェンス対応)
以下のロジックに基づきダイバージェンスを自動描画します。(不要な場合は非表示可能)
<通常のダイバージェンス>
下降示唆: 2つの連続する高値(*)が切り上げられているが、 それぞれの高値に対応するストキャスティクスの値は切り下げている場合
上昇示唆: 2つの連続する安値(*)が切り下がっているが、 それぞれの安値に対応するストキャスティクスの値は切り上がっている場合
*高値(安値)は、左右n本(**)ずつのローソク足の高値(安値)より高い(低い)高値(安値)をピボットハイ・ローとして算出しています。
** nはユーザ設定値です。
<例: ダイバージェンス>
高値SH1はSH1のローソクの高値より左側にn個のより低い高値、右側にn個のより低い高値があった場合に高値として認識されます。
上記の例では高値がSH1>SH2と切り上がっていますが、対応する%Kの値はvalue2>value1と切り下がっているためダイバージェンスと認識されダイバージェンスラインが自動描画されます。
<ヒドゥンダイバージェンス>
下降継続示唆: 2つの連続する高値(*)が切り下がっているが、 それぞれの高値に対応するストキャスティクスの値は切り上がっている場合
上昇継続示唆: 2つの連続する安値(*)が切り上がっているが、 それぞれの安値に対応するストキャスティクスの値は切り下がっている場合
言うまでもないことですが、ダイバージェンスが出たから逆張り、などの安易な発想は避けるべきです。
環境認識の一つの要素として見るべき指標でしょう。
3.%Kが%Dとクロスした時にシグナル表示(MTFの%Kと%Dでも同様)
以下の条件を満たした時にシグナルを表示します。
-ロワーバンドより下で、%Kが%Dを上抜けた時
-アッパーバンドより上で、%Kが%Dを下抜けた時
-ロワーバンドより下で、%K(MTF)が%D(MTF)を上抜けた時
-アッパーバンドより上で、%K(MTF)が%D(MTF)を下抜けた時
4.%Kが%Dとクロスした時にアラート設定
以下の条件でアラート設定が可能です。
-ロワーバンドより下で、%Kが%Dを上抜けた時
-アッパーバンドより上で、%Kが%Dを下抜けた時
インジケーターの使用について
当インジケーターは招待制インジケーター(有料)となっています。
使用を希望される方はプライベートチャットや下記リンクのDMでご連絡ください。
このページのコメント欄はインジケーターそのものに対するコメントやアップデートの記載のためのものとなっております。Tradingviewのハウスルールを守るためにもコメント欄からの連絡はご遠慮ください。
Ticker Change AlertScript can be used to create an alert when the specified change percentage occurs for a given period, on a given exchange/pair.
Originally intended to be used to spot 4% change in BTC
(Alerts+Strategy)Noro's Bands Scalper Strategy v1.6Alerts for @noro strategy
Using with autoview.with.pink
BB %b & RSI Indicator & AlertIndicator for displaying both RSI and a normalized Bollinger Bands %b (Usual 0 - 1 range of BB normalized to the 30 - 70 OB/OS range of RSI) simultaneously.
Settable periods for RSI and BB, and settable standard deviation for BB.
When both Bollinger Bands %b and RSI are OB/OS then the column will turn blue and a buy/sell arrow will appear in the indicator provided other conditions pertaining to the OB/OS condition in one of the last two candles are also met.
You can also set an alert on the arrow indicator appearing.
I use this mainly for Cryptocurrencies, though it is usable in Forex, for shorter time periods to indicate possible trade opportunities.
HEIKIN ASHI COLOUR CHANGE ALERTThis can be used to trigger an alert if Heikin Ashi bar changes color :)
MTF Stochastic CCI ALERTWorks good on 5 or 15min set to the 2hr or 4hr time frame.
Set an alarm (Set an alert on each Long/Short "crossing down", 0.8 (or anything below 0.99), "on condition" )
Or just as a visual.
Best to use other factors to confirm but most of the time it does a pretty decent job.
Bollinger Band and ADX Retrace Alert v0.1 by JustUncleLThis script is an implementation of a well known Bollinger band + ADX retracement strategy for 1min to 15min charts. This variation uses my own settings, a market direction filter and has an alert that can be added to your trading alarms.
Moving Average Cross Alert, Multi-Timeframe (MTF) (by ChartArt)See when two moving averages cross. With the option to choose between four moving average calculations:
SMA = simple moving average
EMA = exponential moving average (default)
WMA = weighted moving average
Linear = linear regression
The moving averages can be plotted from different time-frames, like e.g. the weekly or 4 hour time-frame using HL2, HLC3 or OHLC4 as price source for the calculation. In addition there is a background color alert and arrows when the moving averages cross each other when the price also rises or falls. And the moving averages are colored depending on their trend direction (if they are trending up or down).
TRADINGLibrary "TRADING"
This library is a client script for making a webhook signal formatted string to PoABOT server.
entry_message(password, percent, leverage, margin_mode, kis_number)
Create a entry message for POABOT
Parameters:
password (string) : (string) The password of your bot.
percent (float) : (float) The percent for entry based on your wallet balance.
leverage (int) : (int) The leverage of entry. If not set, your levereage doesn't change.
margin_mode (string) : (string) The margin mode for trade(only for OKX). "cross" or "isolated"
kis_number (int) : (int) The number of koreainvestment account. Default 1
Returns: (string) A json formatted string for webhook message.
order_message(password, percent, leverage, margin_mode, kis_number)
Create a order message for POABOT
Parameters:
password (string) : (string) The password of your bot.
percent (float) : (float) The percent for entry based on your wallet balance.
leverage (int) : (int) The leverage of entry. If not set, your levereage doesn't change.
margin_mode (string) : (string) The margin mode for trade(only for OKX). "cross" or "isolated"
kis_number (int) : (int) The number of koreainvestment account. Default 1
Returns: (string) A json formatted string for webhook message.
close_message(password, percent, margin_mode, kis_number)
Create a close message for POABOT
Parameters:
password (string) : (string) The password of your bot.
percent (float) : (float) The percent for close based on your wallet balance.
margin_mode (string) : (string) The margin mode for trade(only for OKX). "cross" or "isolated"
kis_number (int) : (int) The number of koreainvestment account. Default 1
Returns: (string) A json formatted string for webhook message.
exit_message(password, percent, margin_mode, kis_number)
Create a exit message for POABOT
Parameters:
password (string) : (string) The password of your bot.
percent (float) : (float) The percent for exit based on your wallet balance.
margin_mode (string) : (string) The margin mode for trade(only for OKX). "cross" or "isolated"
kis_number (int) : (int) The number of koreainvestment account. Default 1
Returns: (string) A json formatted string for webhook message.
manual_message(password, exchange, base, quote, side, qty, price, percent, leverage, margin_mode, kis_number, order_name)
Create a manual message for POABOT
Parameters:
password (string) : (string) The password of your bot.
exchange (string) : (string) The exchange
base (string) : (string) The base
quote (string) : (string) The quote of order message
side (string) : (string) The side of order messsage
qty (float) : (float) The qty of order message
price (float) : (float) The price of order message
percent (float) : (float) The percent for order based on your wallet balance.
leverage (int) : (int) The leverage of entry. If not set, your levereage doesn't change.
margin_mode (string) : (string) The margin mode for trade(only for OKX). "cross" or "isolated"
kis_number (int) : (int) The number of koreainvestment account.
order_name (string) : (string) The name of order message
Returns: (string) A json formatted string for webhook message.
in_trade(start_time, end_time, hide_trade_line)
Create a trade start line
Parameters:
start_time (int) : (int) The start of time.
end_time (int) : (int) The end of time.
hide_trade_line (bool) : (bool) if true, hide trade line. Default false.
Returns: (bool) Get bool for trade based on time range.
real_qty(qty, precision, leverage, contract_size, default_qty_type, default_qty_value)
Get exchange specific real qty
Parameters:
qty (float) : (float) qty
precision (float) : (float) precision
leverage (int) : (int) leverage
contract_size (float) : (float) contract_size
default_qty_type (string)
default_qty_value (float)
Returns: (float) exchange specific qty.
method set(this, password, start_time, end_time, leverage, initial_capital, default_qty_type, default_qty_value, margin_mode, contract_size, kis_number, entry_percent, close_percent, exit_percent, fixed_qty, fixed_cash, real, auto_alert_message, hide_trade_line)
Set bot object.
Namespace types: bot
Parameters:
this (bot)
password (string) : (string) password for poabot.
start_time (int) : (int) start_time timestamp.
end_time (int) : (int) end_time timestamp.
leverage (int) : (int) leverage.
initial_capital (float)
default_qty_type (string)
default_qty_value (float)
margin_mode (string) : (string) The margin mode for trade(only for OKX). "cross" or "isolated"
contract_size (float)
kis_number (int) : (int) kis_number for poabot.
entry_percent (float) : (float) entry_percent for poabot.
close_percent (float) : (float) close_percent for poabot.
exit_percent (float) : (float) exit_percent for poabot.
fixed_qty (float) : (float) fixed qty.
fixed_cash (float) : (float) fixed cash.
real (bool) : (bool) convert qty for exchange specific.
auto_alert_message (bool) : (bool) convert alert_message for exchange specific.
hide_trade_line (bool) : (bool) if true, Hide trade line. Default false.
Returns: (void)
method print(this, message)
Print message using log table.
Namespace types: bot
Parameters:
this (bot)
message (string)
Returns: (void)
method start_trade(this)
start trade using start_time and end_time
Namespace types: bot
Parameters:
this (bot)
Returns: (void)
method entry(this, id, direction, qty, limit, stop, oca_name, oca_type, comment, alert_message, when)
It is a command to enter market position. If an order with the same ID is already pending, it is possible to modify the order. If there is no order with the specified ID, a new order is placed. To deactivate an entry order, the command strategy.cancel or strategy.cancel_all should be used. In comparison to the function strategy.order, the function strategy.entry is affected by pyramiding and it can reverse market position correctly. If both 'limit' and 'stop' parameters are 'NaN', the order type is market order.
Namespace types: bot
Parameters:
this (bot)
id (string) : (string) A required parameter. The order identifier. It is possible to cancel or modify an order by referencing its identifier.
direction (string) : (string) A required parameter. Market position direction: 'strategy.long' is for long, 'strategy.short' is for short.
qty (float) : (float) An optional parameter. Number of contracts/shares/lots/units to trade. The default value is 'NaN'.
limit (float) : (float) An optional parameter. Limit price of the order. If it is specified, the order type is either 'limit', or 'stop-limit'. 'NaN' should be specified for any other order type.
stop (float) : (float) An optional parameter. Stop price of the order. If it is specified, the order type is either 'stop', or 'stop-limit'. 'NaN' should be specified for any other order type.
oca_name (string) : (string) An optional parameter. Name of the OCA group the order belongs to. If the order should not belong to any particular OCA group, there should be an empty string.
oca_type (string) : (string) An optional parameter. Type of the OCA group. The allowed values are: "strategy.oca.none" - the order should not belong to any particular OCA group; "strategy.oca.cancel" - the order should belong to an OCA group, where as soon as an order is filled, all other orders of the same group are cancelled; "strategy.oca.reduce" - the order should belong to an OCA group, where if X number of contracts of an order is filled, number of contracts for each other order of the same OCA group is decreased by X.
comment (string) : (string) An optional parameter. Additional notes on the order.
alert_message (string) : (string) An optional parameter which replaces the {{strategy.order.alert_message}} placeholder when it is used in the "Create Alert" dialog box's "Message" field.
when (bool) : (bool) An optional parmeter. Condition, deprecated.
Returns: (void)
method order(this, id, direction, qty, limit, stop, oca_name, oca_type, comment, alert_message, when)
It is a command to place order. If an order with the same ID is already pending, it is possible to modify the order. If there is no order with the specified ID, a new order is placed. To deactivate order, the command strategy.cancel or strategy.cancel_all should be used. In comparison to the function strategy.entry, the function strategy.order is not affected by pyramiding. If both 'limit' and 'stop' parameters are 'NaN', the order type is market order.
Namespace types: bot
Parameters:
this (bot)
id (string) : (string) A required parameter. The order identifier. It is possible to cancel or modify an order by referencing its identifier.
direction (string) : (string) A required parameter. Market position direction: 'strategy.long' is for long, 'strategy.short' is for short.
qty (float) : (float) An optional parameter. Number of contracts/shares/lots/units to trade. The default value is 'NaN'.
limit (float) : (float) An optional parameter. Limit price of the order. If it is specified, the order type is either 'limit', or 'stop-limit'. 'NaN' should be specified for any other order type.
stop (float) : (float) An optional parameter. Stop price of the order. If it is specified, the order type is either 'stop', or 'stop-limit'. 'NaN' should be specified for any other order type.
oca_name (string) : (string) An optional parameter. Name of the OCA group the order belongs to. If the order should not belong to any particular OCA group, there should be an empty string.
oca_type (string) : (string) An optional parameter. Type of the OCA group. The allowed values are: "strategy.oca.none" - the order should not belong to any particular OCA group; "strategy.oca.cancel" - the order should belong to an OCA group, where as soon as an order is filled, all other orders of the same group are cancelled; "strategy.oca.reduce" - the order should belong to an OCA group, where if X number of contracts of an order is filled, number of contracts for each other order of the same OCA group is decreased by X.
comment (string) : (string) An optional parameter. Additional notes on the order.
alert_message (string) : (string) An optional parameter which replaces the {{strategy.order.alert_message}} placeholder when it is used in the "Create Alert" dialog box's "Message" field.
when (bool) : (bool) An optional parmeter. Condition, deprecated.
Returns: (void)
method close_all(this, comment, alert_message, immediately, when)
Exits the current market position, making it flat.
Namespace types: bot
Parameters:
this (bot)
comment (string) : (string) An optional parameter. Additional notes on the order.
alert_message (string) : (string) An optional parameter which replaces the {{strategy.order.alert_message}} placeholder when it is used in the "Create Alert" dialog box's "Message" field.
immediately (bool) : (bool) An optional parameter. If true, the closing order will be executed on the tick where it has been placed, ignoring the strategy parameters that restrict the order execution to the open of the next bar. The default is false.
when (bool) : (bool) An optional parmeter. Condition, deprecated.
Returns: (void)
method cancel(this, id, when)
It is a command to cancel/deactivate pending orders by referencing their names, which were generated by the functions: strategy.order, strategy.entry and strategy.exit.
Namespace types: bot
Parameters:
this (bot)
id (string) : (string) A required parameter. The order identifier. It is possible to cancel an order by referencing its identifier.
when (bool) : (bool) An optional parmeter. Condition, deprecated.
Returns: (void)
method cancel_all(this, when)
It is a command to cancel/deactivate all pending orders, which were generated by the functions: strategy.order, strategy.entry and strategy.exit.
Namespace types: bot
Parameters:
this (bot)
when (bool) : (bool) An optional parmeter. Condition, deprecated.
Returns: (void)
method close(this, id, comment, qty, qty_percent, alert_message, immediately, when)
It is a command to exit from the entry with the specified ID. If there were multiple entry orders with the same ID, all of them are exited at once. If there are no open entries with the specified ID by the moment the command is triggered, the command will not come into effect. The command uses market order. Every entry is closed by a separate market order.
Namespace types: bot
Parameters:
this (bot)
id (string) : (string) A required parameter. The order identifier. It is possible to close an order by referencing its identifier.
comment (string) : (string) An optional parameter. Additional notes on the order.
qty (float) : (float) An optional parameter. Number of contracts/shares/lots/units to exit a trade with. The default value is 'NaN'.
qty_percent (float) : (float) Defines the percentage (0-100) of the position to close. Its priority is lower than that of the 'qty' parameter. Optional. The default is 100.
alert_message (string) : (string) An optional parameter which replaces the {{strategy.order.alert_message}} placeholder when it is used in the "Create Alert" dialog box's "Message" field.
immediately (bool) : (bool) An optional parameter. If true, the closing order will be executed on the tick where it has been placed, ignoring the strategy parameters that restrict the order execution to the open of the next bar. The default is false.
when (bool) : (bool) An optional parmeter. Condition, deprecated.
Returns: (void)
ticks_to_price(ticks, from)
Converts ticks to a price offset from the supplied price or the average entry price.
Parameters:
ticks (float) : (float) Ticks to convert to a price.
from (float) : (float) A price that can be used to calculate from. Optional. The default value is `strategy.position_avg_price`.
Returns: (float) A price level that has a distance from the entry price equal to the specified number of ticks.
method exit(this, id, from_entry, qty, qty_percent, profit, limit, loss, stop, trail_price, trail_points, trail_offset, oca_name, comment, comment_profit, comment_loss, comment_trailing, alert_message, alert_profit, alert_loss, alert_trailing, when)
It is a command to exit either a specific entry, or whole market position. If an order with the same ID is already pending, it is possible to modify the order. If an entry order was not filled, but an exit order is generated, the exit order will wait till entry order is filled and then the exit order is placed. To deactivate an exit order, the command strategy.cancel or strategy.cancel_all should be used. If the function strategy.exit is called once, it exits a position only once. If you want to exit multiple times, the command strategy.exit should be called multiple times. If you use a stop loss and a trailing stop, their order type is 'stop', so only one of them is placed (the one that is supposed to be filled first). If all the following parameters 'profit', 'limit', 'loss', 'stop', 'trail_points', 'trail_offset' are 'NaN', the command will fail. To use market order to exit, the command strategy.close or strategy.close_all should be used.
Namespace types: bot
Parameters:
this (bot)
id (string) : (string) A required parameter. The order identifier. It is possible to cancel or modify an order by referencing its identifier.
from_entry (string) : (string) An optional parameter. The identifier of a specific entry order to exit from it. To exit all entries an empty string should be used. The default values is empty string.
qty (float) : (float) An optional parameter. Number of contracts/shares/lots/units to exit a trade with. The default value is 'NaN'.
qty_percent (float) : (float) Defines the percentage of (0-100) the position to close. Its priority is lower than that of the 'qty' parameter. Optional. The default is 100.
profit (float) : (float) An optional parameter. Profit target (specified in ticks). If it is specified, a limit order is placed to exit market position when the specified amount of profit (in ticks) is reached. The default value is 'NaN'.
limit (float) : (float) An optional parameter. Profit target (requires a specific price). If it is specified, a limit order is placed to exit market position at the specified price (or better). Priority of the parameter 'limit' is higher than priority of the parameter 'profit' ('limit' is used instead of 'profit', if its value is not 'NaN'). The default value is 'NaN'.
loss (float) : (float) An optional parameter. Stop loss (specified in ticks). If it is specified, a stop order is placed to exit market position when the specified amount of loss (in ticks) is reached. The default value is 'NaN'.
stop (float) : (float) An optional parameter. Stop loss (requires a specific price). If it is specified, a stop order is placed to exit market position at the specified price (or worse). Priority of the parameter 'stop' is higher than priority of the parameter 'loss' ('stop' is used instead of 'loss', if its value is not 'NaN'). The default value is 'NaN'.
trail_price (float) : (float) An optional parameter. Trailing stop activation level (requires a specific price). If it is specified, a trailing stop order will be placed when the specified price level is reached. The offset (in ticks) to determine initial price of the trailing stop order is specified in the 'trail_offset' parameter: X ticks lower than activation level to exit long position; X ticks higher than activation level to exit short position. The default value is 'NaN'.
trail_points (float) : (float) An optional parameter. Trailing stop activation level (profit specified in ticks). If it is specified, a trailing stop order will be placed when the calculated price level (specified amount of profit) is reached. The offset (in ticks) to determine initial price of the trailing stop order is specified in the 'trail_offset' parameter: X ticks lower than activation level to exit long position; X ticks higher than activation level to exit short position. The default value is 'NaN'.
trail_offset (float) : (float) An optional parameter. Trailing stop price (specified in ticks). The offset in ticks to determine initial price of the trailing stop order: X ticks lower than 'trail_price' or 'trail_points' to exit long position; X ticks higher than 'trail_price' or 'trail_points' to exit short position. The default value is 'NaN'.
oca_name (string) : (string) An optional parameter. Name of the OCA group (oca_type = strategy.oca.reduce) the profit target, the stop loss / the trailing stop orders belong to. If the name is not specified, it will be generated automatically.
comment (string) : (string) Additional notes on the order. If specified, displays near the order marker on the chart. Optional. The default is na.
comment_profit (string) : (string) Additional notes on the order if the exit was triggered by crossing `profit` or `limit` specifically. If specified, supercedes the `comment` parameter and displays near the order marker on the chart. Optional. The default is na.
comment_loss (string) : (string) Additional notes on the order if the exit was triggered by crossing `stop` or `loss` specifically. If specified, supercedes the `comment` parameter and displays near the order marker on the chart. Optional. The default is na.
comment_trailing (string) : (string) Additional notes on the order if the exit was triggered by crossing `trail_offset` specifically. If specified, supercedes the `comment` parameter and displays near the order marker on the chart. Optional. The default is na.
alert_message (string) : (string) Text that will replace the '{{strategy.order.alert_message}}' placeholder when one is used in the "Message" field of the "Create Alert" dialog. Optional. The default is na.
alert_profit (string) : (string) Text that will replace the '{{strategy.order.alert_message}}' placeholder when one is used in the "Message" field of the "Create Alert" dialog. Only replaces the text if the exit was triggered by crossing `profit` or `limit` specifically. Optional. The default is na.
alert_loss (string) : (string) Text that will replace the '{{strategy.order.alert_message}}' placeholder when one is used in the "Message" field of the "Create Alert" dialog. Only replaces the text if the exit was triggered by crossing `stop` or `loss` specifically. Optional. The default is na.
alert_trailing (string) : (string) Text that will replace the '{{strategy.order.alert_message}}' placeholder when one is used in the "Message" field of the "Create Alert" dialog. Only replaces the text if the exit was triggered by crossing `trail_offset` specifically. Optional. The default is na.
when (bool) : (bool) An optional parmeter. Condition, deprecated.
Returns: (void)
percent_to_ticks(percent, from)
Converts a percentage of the supplied price or the average entry price to ticks.
Parameters:
percent (float) : (float) The percentage of supplied price to convert to ticks. 50 is 50% of the entry price.
from (float) : (float) A price that can be used to calculate from. Optional. The default value is `strategy.position_avg_price`.
Returns: (float) A value in ticks.
percent_to_price(percent, from)
Converts a percentage of the supplied price or the average entry price to a price.
Parameters:
percent (float) : (float) The percentage of the supplied price to convert to price. 50 is 50% of the supplied price.
from (float) : (float) A price that can be used to calculate from. Optional. The default value is `strategy.position_avg_price`.
Returns: (float) A value in the symbol's quote currency (USD for BTCUSD).
bot
Fields:
password (series__string)
start_time (series__integer)
end_time (series__integer)
leverage (series__integer)
initial_capital (series__float)
default_qty_type (series__string)
default_qty_value (series__float)
margin_mode (series__string)
contract_size (series__float)
kis_number (series__integer)
entry_percent (series__float)
close_percent (series__float)
exit_percent (series__float)
log_table (series__table)
fixed_qty (series__float)
fixed_cash (series__float)
real (series__bool)
auto_alert_message (series__bool)
hide_trade_line (series__bool)
AlertiTI can't be glued to all charts on all tickers all the time. I have a life you know, lol.
So in the spirit of getting fresh air, running errands, working and having fun with family & friends, I setup this AlertiT script.
Three indicators: RSI, SMA and Momentum are used in this script alert.
The alert will be triggered if any of the indicators crosses a specified input.
The message will contain the name of the indicator and its current value.
The default is 13 SMA, 9 RSI +75:-25 and 11 Momentum.
I provided an input in the dialogue box so the variables can be adjusted to suit your needs.
Source is open, high, low, close.
Do your own due diligence, your risk is 100% your responsibility. You win some or you learn some. Consider being charitable with some of your profit to help humankind. Small incremental steps work : If you double a penny a day for a month it = $5,368,709. Good luck and happy trading friends...
*3x lucky 7s of trading*
7pt Trading compass:
Price action, entry/exit
Volume average/direction
Trend, patterns, momentum
Newsworthy current events
Revenue
Earnings
Balance sheet
7 Common mistakes:
+5% portfolio trades, risk management
Beware of analysts motives
Emotions & Opinions
FOMO : bad timing
Lack of planning & discipline
Forgetting restraint
Obdurate repetitive errors, no adaptation
7 Important tools:
Trading View app!, Brokerage UI
Accurate indicators & settings
Wide screen monitor/s
Trading log (pencil & graph paper)
Big organized desk
Reading books, playing chess
Sorted watch-list
Checkout my indicators:
Fibonacci VIP - volume
Fibonacci MA7 - price
pi RSI - trend momentum
TTC - trend channel
AlertiT - notification
www.tradingview.com
PlurexSignalCoreLibrary "PlurexSignalCore"
General purpose functions and helpers for use in more specific Plurex Signal alerting scripts and libraries
plurexMarket()
Build a Plurex market string from a base and quote asset symbol.
Returns: A market string that can be used in Plurex Signal messages.
tickerToPlurexMarket()
Builds Plurex market string from the syminfo
Returns: A market string that can be used in Plurex Signal messages.
simpleMessage(secret, action, marketOverride)
Builds Plurex Signal Message json to be sent to a Signal webhook
Parameters:
secret : The secret for your Signal on plurex
action : The action of the message. One of .
marketOverride : Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
Returns: A json string message that can be used in alerts to send messages to Plurex.
entryMessage(secret, isLong, budgetPercentage, priceLimit, marketOverride)
Builds Plurex Signal Entry Message json to be sent to a Signal webhook with optional parameters for budget and price limits.
Parameters:
secret : The secret for your Signal on plurex
isLong : The action of the message. true for LONG, false for SHORT.
budgetPercentage : Optional, The percentage of budget to use in the entry.
priceLimit : Optional, The worst price to accept for the entry.
marketOverride : Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
Returns: A json string message that can be used in alerts to send messages to Plurex.
long(secret, budgetPercentage, priceLimit, marketOverride)
Builds Plurex Signal LONG Message json to be sent to a Signal webhook with optional parameters for budget and price limits.
Parameters:
secret : The secret for your Signal on plurex
budgetPercentage : Optional, The percentage of budget to use in the entry.
priceLimit : Optional, The worst price to accept for the entry.
marketOverride : Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
Returns: A json string message that can be used in alerts to send messages to Plurex.
short(secret, budgetPercentage, priceLimit, marketOverride)
Builds Plurex Signal SHORT Message json to be sent to a Signal webhook with optional parameters for budget and price limits.
Parameters:
secret : The secret for your Signal on plurex
budgetPercentage : Optional, The percentage of budget to use in the entry.
priceLimit : Optional, The worst price to accept for the entry.
marketOverride : Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
Returns: A json string message that can be used in alerts to send messages to Plurex.
closeAll(secret, marketOverride)
Builds Plurex Signal CLOSE_ALL Message json to be sent to a Signal webhook.
Parameters:
secret : The secret for your Signal on plurex
marketOverride : Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
Returns: A json string message that can be used in alerts to send messages to Plurex.
closeShorts(secret, marketOverride)
Builds Plurex Signal CLOSE_SHORTS Message json to be sent to a Signal webhook.
Parameters:
secret : The secret for your Signal on plurex
marketOverride : Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
Returns: A json string message that can be used in alerts to send messages to Plurex.
closeLongs(secret, marketOverride)
Builds Plurex Signal CLOSE_LONGS Message json to be sent to a Signal webhook.
Parameters:
secret : The secret for your Signal on plurex
marketOverride : Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
Returns: A json string message that can be used in alerts to send messages to Plurex.
closeFirstLong(secret, marketOverride)
Builds Plurex Signal CLOSE_FIRST_LONG Message json to be sent to a Signal webhook.
Parameters:
secret : The secret for your Signal on plurex
marketOverride : Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
Returns: A json string message that can be used in alerts to send messages to Plurex.
closeLastLong(secret, marketOverride)
Builds Plurex Signal CLOSE_LAST_LONG Message json to be sent to a Signal webhook.
Parameters:
secret : The secret for your Signal on plurex
marketOverride : Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
Returns: A json string message that can be used in alerts to send messages to Plurex.
closeFirstShort(secret, marketOverride)
Builds Plurex Signal CLOSE_FIRST_SHORT Message json to be sent to a Signal webhook.
Parameters:
secret : The secret for your Signal on plurex
marketOverride : Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
Returns: A json string message that can be used in alerts to send messages to Plurex.
closeLastShort(secret, marketOverride)
Builds Plurex Signal CLOSE_LAST_SHORT Message json to be sent to a Signal webhook.
Parameters:
secret : The secret for your Signal on plurex
marketOverride : Optional, defaults to the syminfo for the ticker. Use the `plurexMarket` function to build your own.
Returns: A json string message that can be used in alerts to send messages to Plurex.
alerts++- Add up to 20 simple alerts per instance
- Each alert requires input of ticker, timeframe, over/under/either, target price
i.e. 'KUCOIN:BNB/USD', '60', 'over', '535'
- Each alert fires once per bar, so choose your timeframe wisely.
- Timeframe options: www.tradingcode.net
Caveats:
- You must manually set the alert group by clicking "add alert" and then selecting name of script, "alert++"
- If you make changes to the settings inputs, you have to delete the previous alert and add a new alert for the changes to take effect. That is, tradingview only "remembers" the state of your chart and settings at the time you set the alert (group).
CustomAlertLibLibrary "CustomAlertLib"
Custom alert formatting library
customAlert(format, message, freq)
Formats and triggers custom alerts with placeholders
Parameters:
format (string) : String containing the alert format template
message (string) : String containing the alert message
freq (simple string) : (optional) Alert frequency as string, defaults to "once_per_bar_close"
Returns: void