[Alerts]QQE Cross v6.0 by JustUncleLDescription:
This is a major upgrade of my original QQE indicator Tool, this version is directed at Forex and Crypto Margin trading. This version can also be used with AutoView/ProfitView Chrome add-on in a semi-automatic (turn on only when conditions are favorable) or automatic way, with Signal to Signal or Signal to Close trading.
This is a Trend following indicator that uses fast QQE crosses to capture swings in direction of the main Trend. Alerts are filtered with Two Moving Average Ribbons and/or Direction of MAs. The QQE or Qualitative Quantitative Estimation is based on the relative strength index (RSI), but uses a smoothing technique as an additional transformation. Three crosses can be selected (all selected by default):
Smooth RSI signal crossing ZERO (XZ)
Smooth RSI signal crossing Fast QQE line (XQ), this is like an early warning swing signal.
Smooth RSI signal exiting the RSI Threshhold Channel (XC), this is like a confirmed swing signal. An optimal Smooth RSI threshold level is between 5% and 10% (default=10), it helps reduce the false swings.
These signals can be selected to Open Short/Long and/or Close a trade, default is XC open trade and XQ (or opposite open) to Close trade.
The (LONG/SHORT) alerts can be optionally filtered by the Moving Average Ribbons:
For LONG alert the Close must be above the fast MA Ribbon and fast MA Ribbon must be above the slow MA Ribbon.
For SHORT alert the Close must be below the fast MA Ribbon and fast MA Ribbon must be below the slow MA Ribbon.
and/or directional filter:
For LONG alert the Close must be above the medium MA and the directional of both MA ribbons must be Bullish.
For SELL alert the Close must be below the medium MA and the directional of both MA ribbons must be Bearish.
This indicator is designed to be used as a Signal to Signal trading BOT in automatic or semi-automatic way (start and stop when conditions are suitable).
For LONG and SHORT alerts I recommend you use "Once per Bar" alarm option
For CLOSE alerts I recommend you use "Once per Bar Close" alarm option
(* The script has been designed so that long/short signals come at start of candles *)
(* and close signals come at the end of candles *)
In den Scripts nach "bot" suchen
Build A BotThis is the Robot we built during the 60 Minute Build-A-Bot webinar on September 12, 2018. We had a great time, and a lot of participation and the best part was that we finished up this robot and even ran a backtest in exactly 60 minutes! We built this robot based on recommendations and suggestions from those who were attending live. Lots of pieces in this robot, but you can always tinker with it, remove stuff, add things, whatever you want!
This version uses the CCI as a trigger for trade entry. The other version uses the Hull Moving Average as a trigger for trade entry.
Build A Bot Hull TriggerThis is the automated trading system we built during the 60-Minute Build-A-Bot webinar on September 12, 2018. We had a lot of fun, and implemented a TON of indicators LIVE during this webinar! And the best part is that as a group we researched, designed, and built a profitable robot in exactly 60 minutes!
We started by voting on the type of trading system, and this is a trend following system because it got the most votes. Then, the attendees in the webinar sent in their suggestions for indicators and settings during the live webinar (still counting toward the 60 minutes). Once we had the indicators on the chart, and we discussed various settings we could use, we got to work building the robot, and ran the first strategy test...and it was profitable!
This version uses the Hull Moving Average as a trigger for initiating the trade, and everything else is the same for the filters. The other version uses the CCI as a trigger for the trade, and many other indicators as filters.
simple botthe AI=
value of close of candle < value of close of candle previous by 1 = sell
close > close1 = buy
closeorder on SL
closeorder on AutoProfit
closeorder on signal reverse (if openorder not in profit)
MACDouble + RSI (rec. 15min-2hr intrv) Uses two sets of MACD plus an RSI to either long or short. All three indicators trigger buy/sell as one (ie it's not 'IF MACD1 OR MACD2 OR RSI > 1 = buy", its more like "IF 1 AND 2 AND RSI=buy", all 3 match required for trigger)
The MACD inputs should be tweaked depending on timeframe and what you are trading. If you are doing 1, 3, 5 min or real frequent trading then 21/44/20 and 32/66/29 or other high value MACDs should be considered. If you are doing longer intervals like 2, 3, 4hr then consider 9/19/9 and 21/44/20 for MACDs (experiment! I picked these example #s randomly).
Ideal usage for the MACD sets is to have MACD2 inputs at around 1.5x, 2x, or 3x MACD1's inputs.
Other settings to consider: try having fastlength1=macdlength1 and then (fastlength2 = macdlength2 - 2). Like 10/26/10 and 23/48/20. This seems to increase net profit since it is more likely to trigger before major price moves, but may decrease profitable trade %. Conversely, consider FL1=MCDL1 and FL2 = MCDL2 + (FL2 * 0.5). Example: 10/26/10 and 22/48/30 this can increase profitable trade %, though may cost some net profit.
Feel free to message me with suggestions or questions.
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)
ProfitView Strategy TemplateHello traders,
This script took me a full week of coding/testing, sweat, and tears - and I’m too nice as I’m giving it for free to the community.
If you're tired of manual trading and looking for a solid strategy template to pair with your indicators, look no further.
This Pine Script v5 strategy template is engineered for maximum customization and risk management.
Best part?
This Pine Script v5 template facilitates the dynamic construction of ProfitView alerts, sparing users the time and effort of mastering the ProfitView syntax and manually creating alert commands.
This powerful tool gives much power to those who don't know how to code in Pinescript and want to automate their indicators' signals via the ProfitView Chrome extension.
IMPORTANT NOTES
ProfitView is a trading bot software that forwards TradingView alerts to your brokers (examples: Binance, Oanda, Coinbase, Bybit, etc.) for automating trading.
Many traders don't know how to dynamically create ProfitView-compatible alerts using the data from their TradingView scripts.
Traders using trading bots want their alerts to reflect the stop-loss/take-profit/trailing-stop/stop-loss to break options from your script and then create the orders accordingly.
This script showcases how to create ProfitView alerts dynamically.
TRADINGVIEW ALERTS
1) You'll have to create one alert per asset X timeframe = 1 chart.
Example: 1 alert for EUR/USD on the 5 minutes chart, 1 alert for EUR/USD on the 15-minute chart (assuming you want your bot to trade the EUR/USD on the 5 and 15-minute timeframes)
2) Select the Order fills and alert() function calls condition
3) For each alert, the alert message is pre-configured with the text below
{{strategy.order.alert_message}}
Please leave it as it is.
It's a TradingView native variable that will fetch the alert text messages built by the script.
4) ProfitView doesn't use webhook technology, so setting a webhook URL from the alerts notifications tab is unnecessary.
KEY FEATURES
I) Modular Indicator Connection
* plug your existing indicator into the template.
* Only two lines of code are needed for full compatibility.
Step 1: Create your connector
Adapt your indicator with only 2 lines of code and then connect it to this strategy template.
To do so:
1) Find in your indicator where the conditions print the long/buy and short/sell signals.
2) Create an additional plot as below
I'm giving an example with a Two moving averages cross.
Please replicate the same methodology for your indicator, whether a MACD , ZigZag, Pivots , higher-highs, lower-lows or whatever indicator with clear buy and sell conditions.
//@version=5
indicator("Supertrend", overlay = true, timeframe = "", timeframe_gaps = true)
atrPeriod = input.int(10, "ATR Length", minval = 1)
factor = input.float(3.0, "Factor", minval = 0.01, step = 0.01)
= ta.supertrend(factor, atrPeriod)
supertrend := barstate.isfirst ? na : supertrend
bodyMiddle = plot(barstate.isfirst ? na : (open + close) / 2, display = display.none)
upTrend = plot(direction < 0 ? supertrend : na, "Up Trend", color = color.green, style = plot.style_linebr)
downTrend = plot(direction < 0 ? na : supertrend, "Down Trend", color = color.red, style = plot.style_linebr)
fill(bodyMiddle, upTrend, color.new(color.green, 90), fillgaps = false)
fill(bodyMiddle, downTrend, color.new(color.red, 90), fillgaps = false)
buy = ta.crossunder(direction, 0)
sell = ta.crossunder(direction, 0)
//////// CONNECTOR SECTION ////////
Signal = buy ? 1 : sell ? -1 : 0
plot(Signal, title = "Signal", display = display.data_window)
//////// CONNECTOR SECTION ////////
Important Notes
🔥 The Strategy Template expects the value to be exactly 1 for the bullish signal and -1 for the bearish signal
Now, you can connect your indicator to the Strategy Template using the method below or that one.
Step 2: Connect the connector
1) Add your updated indicator to a TradingView chart
2) Add the Strategy Template as well to the SAME chart
3) Open the Strategy Template settings, and in the Data Source field, select your 🔌Connector🔌 (which comes from your indicator)
Note it doesn’t have to be named 🔌Connector🔌 - you can name it as you want - however, I recommend an explicit name you can easily remember.
From then, you should start seeing the signals and plenty of other stuff on your chart.
🔥 Note that whenever you update your indicator values, the strategy statistics and visuals on your chart will update in real-time
II) BOT Risk Management:
- Max Drawdown:
Mode: Select whether the max drawdown is calculated in percentage (%) or USD.
Value: If the max drawdown reaches this specified value, set a value to halt the bot.
- Max Consecutive Days:
Use Max Consecutive Days BOT Halt: Enable/Disable halting the bot if the max consecutive losing days value is reached.
- Max Consecutive Days: Set the maximum number of consecutive losing days allowed before halting the bot.
- Max Losing Streak:
Use Max Losing Streak: Enable/Disable a feature to prevent the bot from taking too many losses in a row.
- Max Losing Streak Length: Set the maximum length of a losing streak allowed.
Margin Call:
- Use Margin Call: Enable/Disable a feature to exit when a specified percentage away from a margin call to prevent it.
Margin Call (%): Set the percentage value to trigger this feature.
- Close BOT Total Loss:
Use Close BOT Total Loss: Enable/Disable a feature to close all trades and halt the bot if the total loss is reached.
- Total Loss ($): Set the total loss value in USD to trigger this feature.
Intraday BOT Risk Management:
- Intraday Losses:
Use Intraday Losses BOT Halt: Enable/Disable halting the bot on reaching specified intraday losses.
Mode: Select whether the intraday loss is calculated in percentage (%) or USD.
- Max Intraday Losses (%): Set the value for maximum intraday losses.
Limit Intraday Trades:
- Use Limit Intraday Trades: Enable/Disable a feature to limit the number of intraday trades.
- Max Intraday Trades: Set the maximum number of intraday trades allowed.
Restart Intraday EA:
- Use Restart Intraday EA: Enable/Disable a feature to restart the bot at the first bar of the next day if it has been stopped with an intraday risk management safeguard.
III) Order Types and Position Sizing
- Choose between market, limit, or stop orders.
- Set your position size directly in the template.
Please use the position size from the “Inputs” and not the “Properties” tab.
I know it's redundant. - the template needs this value from the "Inputs" tab to build the alerts, and the Backtester needs it from the "Properties" tab.
IV) Advanced Take-Profit and Stop-Loss Options
- Choose to set your SL/TP in either pips or percentages.
- Option for multiple take-profit levels and trailing stop losses.
- Move your stop loss to break even +/- offset in pips for “risk-free” trades.
V) Miscellaneous
Retry order openings if they fail.
Order Types:
Select and specify order type and price settings.
Position Size:
Define the type and size of positions.
Leverage:
Leverage settings, including margin type and hedge mode.
Session:
Limit trades to specific sessions.
Dates:
Limit trades to a specific date range.
Trades Direction:
Direction: Specify the market direction for opening positions.
VI) Notifications (Telegram/Discord/Email/IFTTT/Twilio/SMS)
Customize notifications sent to Telegram, Discord, Email, IFTTT, Twilio, and ProfitView Logger.
VII) Logger
The ProfitView commands are logged in the TradingView logger.
You'll find more information about it in this TradingView blog post .
WHY YOU MIGHT NEED THIS TEMPLATE
1) Transform your indicator into a ProfitView trading bot more easily than before
Connect your indicator to the template
Create your alerts
Set your EA settings
2) Save Time
Auto-generated alert messages for ProfitView.
I tested them all and checked with the support team what could/couldn’t be done.
3) Be in Control
Manage your trading risks with advanced features.
4) Customizable
Fits various trading styles and asset classes.
REQUIREMENTS
* Make sure you have your ProfitView account and do the settings correctly in your Chrome extension. If you don't know how to do it, read the documentation + ask for help in the ProfitView Discord support channel.
* If there is any issue with the template, ask me in the comments section - I’ll answer quickly.
BACKTEST RESULTS FROM THIS POST
1) I connected this strategy template to a dummy Supertrend script.
I could have selected any other indicator or concept for this script post.
I wanted to share an example of how you can quickly upgrade your strategy, making it compatible with ProfitView.
2) The backtest results aren't relevant for this educational script publication.
I used realistic backtesting data but didn't look too much into optimizing the results, as this isn't the point of why I'm publishing this script.
This strategy is a template to be connected to any indicator - the sky is the limit. :)
3) This template is made to take 1 trade per direction at any given time.
Pyramiding is set to 1 on TradingView.
The strategy default settings are:
* Initial Capital: 100000 USD
* Position Size: 1%
* Commission Percent: 0.075%
* Slippage: 1 tick
* No margin/leverage used
Best regards,
Dave
TradingView.To Strategy Template (with Dyanmic Alerts)Hello traders,
If you're tired of manual trading and looking for a solid strategy template to pair with your indicators, look no further.
This Pine Script v5 strategy template is engineered for maximum customization and risk management.
Best part?
This Pine Script v5 template facilitates the dynamic construction of TradingView.TO alerts, sparing users the time and effort of mastering the TradingView.TO syntax and manually create alert commands.
This powerful tool gives much power to those who don't know how to code in Pinescript and want to automate their indicators' signals via TradingView.TO bot.
IMPORTANT NOTES
TradingView.TO is a trading bot software that forwards TradingView alerts to your brokers (examples: Binance, Oanda, Coinbase, Bybit, Metatrader 4/5, ...) for automating trading.
Many traders don't know how to create TradingView.TO dynamically-compatible alerts using the data from their TradingView scripts.
Traders using trading bots want their alerts to reflect the stop-loss/take-profit/trailing-stop/stop-loss to break options from your script and then create the orders accordingly.
This script showcases how to create TradingView.TO alerts dynamically.
TRADINGVIEW ALERTS
1) You'll have to create one alert per asset X timeframe = 1 chart.
Example: 1 alert for BTC/USDT on the 5 minutes chart, 1 alert for BTC/USDT on the 15-minute chart (assuming you want your bot to trade the BTC/USDT on the 5 and 15-minute timeframes)
2) Select the Order fills and alert() function calls condition
3) For each alert, the alert message is pre-configured with the text below
{{strategy.order.alert_message}}
Please leave it as it is.
It's a TradingView native variable that will fetch the alert text messages built by the script.
4) TradingView.TO uses webhook technology - setting a webhook URL from the alerts notifications tab is required.
KEY FEATURES
I) Modular Indicator Connection
* plug your existing indicator into the template.
* Only two lines of code are needed for full compatibility.
Step 1: Create your connector
Adapt your indicator with only 2 lines of code and then connect it to this strategy template.
To do so:
1) Find in your indicator where the conditions print the long/buy and short/sell signals.
2) Create an additional plot as below
I'm giving an example with a Two moving averages cross.
Please replicate the same methodology for your indicator, whether a MACD , ZigZag, Pivots , higher-highs, lower-lows or whatever indicator with clear buy and sell conditions.
//@version=5
indicator("Supertrend", overlay = true, timeframe = "", timeframe_gaps = true)
atrPeriod = input.int(10, "ATR Length", minval = 1)
factor = input.float(3.0, "Factor", minval = 0.01, step = 0.01)
= ta.supertrend(factor, atrPeriod)
supertrend := barstate.isfirst ? na : supertrend
bodyMiddle = plot(barstate.isfirst ? na : (open + close) / 2, display = display.none)
upTrend = plot(direction < 0 ? supertrend : na, "Up Trend", color = color.green, style = plot.style_linebr)
downTrend = plot(direction < 0 ? na : supertrend, "Down Trend", color = color.red, style = plot.style_linebr)
fill(bodyMiddle, upTrend, color.new(color.green, 90), fillgaps = false)
fill(bodyMiddle, downTrend, color.new(color.red, 90), fillgaps = false)
buy = ta.crossunder(direction, 0)
sell = ta.crossunder(direction, 0)
//////// CONNECTOR SECTION ////////
Signal = buy ? 1 : sell ? -1 : 0
plot(Signal, title = "Signal", display = display.data_window)
//////// CONNECTOR SECTION ////////
Important Notes
🔥 The Strategy Template expects the value to be exactly 1 for the bullish signal and -1 for the bearish signal
Now, you can connect your indicator to the Strategy Template using the method below or that one.
Step 2: Connect the connector
1) Add your updated indicator to a TradingView chart
2) Add the Strategy Template as well to the SAME chart
3) Open the Strategy Template settings, and in the Data Source field, select your 🔌Connector🔌 (which comes from your indicator)
Note it doesn’t have to be named 🔌Connector🔌 - you can name it as you want - however, I recommend an explicit name you can easily remember.
From then, you should start seeing the signals and plenty of other stuff on your chart.
🔥 Note that whenever you update your indicator values, the strategy statistics and visuals on your chart will update in real-time
II) BOT Risk Management:
- Max Drawdown:
Mode: Select whether the max drawdown is calculated in percentage (%) or USD.
Value: If the max drawdown reaches this specified value, set a value to halt the bot.
- Max Consecutive Days:
Use Max Consecutive Days BOT Halt: Enable/Disable halting the bot if the max consecutive losing days value is reached.
- Max Consecutive Days: Set the maximum number of consecutive losing days allowed before halting the bot.
- Max Losing Streak:
Use Max Losing Streak: Enable/Disable a feature to prevent the bot from taking too many losses in a row.
- Max Losing Streak Length: Set the maximum length of a losing streak allowed.
Margin Call:
- Use Margin Call: Enable/Disable a feature to exit when a specified percentage away from a margin call to prevent it.
Margin Call (%): Set the percentage value to trigger this feature.
- Close BOT Total Loss:
Use Close BOT Total Loss: Enable/Disable a feature to close all trades and halt the bot if the total loss is reached.
- Total Loss ($): Set the total loss value in USD to trigger this feature.
Intraday BOT Risk Management:
- Intraday Losses:
Use Intraday Losses BOT Halt: Enable/Disable halting the bot on reaching specified intraday losses.
Mode: Select whether the intraday loss is calculated in percentage (%) or USD.
- Max Intraday Losses (%): Set the value for maximum intraday losses.
Limit Intraday Trades:
- Use Limit Intraday Trades: Enable/Disable a feature to limit the number of intraday trades.
- Max Intraday Trades: Set the maximum number of intraday trades allowed.
Restart Intraday EA:
III) Order Types and Position Sizing
- Choose between market or limit orders.
- Set your position size directly in the template.
Please use the position size from the “Inputs” and not the “Properties” tab.
I know it's redundant. - the template needs this value from the "Inputs" tab to build the alerts, and the Backtester needs it from the "Properties" tab.
IV) Advanced Take-Profit and Stop-Loss Options
- Choose to set your SL/TP in either USD or percentages.
- Option for multiple take-profit levels and trailing stop losses.
- Move your stop loss to break even +/- offset in USD for “risk-free” trades.
V) Miscellaneous:
Retry order openings if they fail.
Order Types:
Select and specify order type and price settings.
Position Size:
Define the type and size of positions.
Leverage:
Leverage settings, including margin type and hedge mode.
Session:
Limit trades to specific sessions.
Dates:
Limit trades to a specific date range.
Trades Direction:
Direction: Specify the market direction for opening positions.
VI) Logger
The TradingView.TO commands are logged in the TradingView logger.
You'll find more information about it in this TradingView blog post .
WHY YOU MIGHT NEED THIS TEMPLATE
1) Transform your indicator into a TradingView.TO trading bot more easily than before
Connect your indicator to the template
Create your alerts
Set your EA settings
2) Save Time
Auto-generated alert messages for TradingView.TO.
I tested them all and checked with the support team what could/couldn’t be done.
3) Be in Control
Manage your trading risks with advanced features.
4) Customizable
Fits various trading styles and asset classes.
REQUIREMENTS
* Make sure you have your TradingView.TO account
* If there is any issue with the template, ask me in the comments section - I’ll answer quickly.
BACKTEST RESULTS FROM THIS POST
1) I connected this strategy template to a dummy Supertrend script.
I could have selected any other indicator or concept for this script post.
I wanted to share an example of how you can quickly upgrade your strategy, making it compatible with TradingView.TO.
2) The backtest results aren't relevant for this educational script publication.
I used realistic backtesting data but didn't look too much into optimizing the results, as this isn't the point of why I'm publishing this script.
This strategy is a template to be connected to any indicator - the sky is the limit. :)
3) This template is made to take 1 trade per direction at any given time.
Pyramiding is set to 1 on TradingView.
The strategy default settings are:
* Initial Capital: 100000 USD
* Position Size: 1%
* Commission Percent: 0.075%
* Slippage: 1 tick
* No margin/leverage used
Ranged Volume DCA Strategy - R3c0nTraderUpdate: Republishing this as Public Open-Source script.
Credits:
Thank you "EvoCrypto" for granting me permission to use "Ranged Volume" to create this strategy.
Thank you "junyou0424" for granting me permission to use "DCA Bot with SuperTrend Emulator" which I used for adding bot inputs, calculations, and strategy
What does this do?
This script is mainly used for backtesting a Ranged Volume strategy to see how a 3Commas bot would perform.
I created this script out of necessity and I wanted a way to test a 3Commas DCA bot with a strategy based on “Volume.”
I came across "EvoCrypto’s" "Ranged Volume" study and strategy in TradingView and I liked it. I wanted to configure it so it can be used for DCA bot backtesting. I used parts from "junyou0424’s" "DCA Bot with SuperTrend Emulator" to add the following:
1. The Start Time and End Time
2. Price deviation to open safety orders (%)
3. Target Take Profit (%)
4. Trailing deviation
5. Base Order and Safety Order
6. Safety order volume scale
7. Safety order step scale
8. Max safety orders
In addition to the above, I also added chart indicators for "Take Profit" as well as "Safety Order"
Pre-requisites:
You can use this script without a 3Commas account and see how 3Commas DCA Bot and Ranged Volume strategy would perform vs. a non-DCA strategy. However, I highly recommend signing up for their free account and going through their training. This would give you a base understanding on the settings you will see in this strategy and why you will need to know them.
That said these are the pre-requisites I suggest you have:
1. Base Knowledge of 3Commas DCA bots
2. Base knowledge of settings such as “Max safety trades count”, “safety order volume scale” and “safety order step scale”. If these are alien to you, I suggest you read up on these.
3. Knowledge of setting up a Single-pair 3Commas bot for receiving custom TradingView signal.
4. A paper-bot to test your ideas. (Do not use a real money bot until you have tested it sufficiently with a paper-bot. You alone are responsible for your results!)
5. Add the study I created called "R3c0nTrader’s Ranged Volume Study” which adds a separate chart in its own pane showing the volume spikes. It will also generate the “buy” signals for your bot. NOTE: The study also has the same color scheme as this strategy and having the colors in both the strategy and the study will make things easier to see. If you use EvoCrypto’s Ranged Volume Study instead, just keep in mind that the colors won’t match, and you will have to manually match them.
6. Make your buy signals from your strategy are the same as in your study! To do this, use the same “Volume Range Length” you entered in the STRATEGY and enter that value for the “Volume Range Length” in the STUDY. Also ensure you have the same settings for “Heikin Ashi” (On or Off).
Comparisons of Ranged Volume Strategy vs Ranged Volume DCA Strategy
BTCUSD
Beware of Strategies that claim super high profits. This can easily be done by lowering the initial capital to something unrealistic. If I did that with this strategy and set the initial capital $100 and base order size to $100, I get a net profit of 2,864% which is not realistic.
How to Use
1. On the “Inputs” tab:
a. Set your Start and End Time to backtest against.
b. Set your “Volume Range Length” (number of bars to look back)
c. “Heikin Ashi Colors” – Usually I leave this enabled
d. “Show Bar Colors” – Leave enabled
e. “Show Break-Out” – Leave enabled
f. “Show Range” – Leave enabled
g. Set your other inputs which are those settings you would find in your 3Commas bot that you want to test (e.g., Price deviation to open safety orders, Target Take Profit, Base order, Safety order, etc.).
h. Quick Example for BTCUSD on 2hr chart:
i. Price deviation to open safety orders (%) = 6
ii. Target Take Profit (%) = 14
iii. Trailing deviation = 0
iv. Base order = 100
v. Safety order = 200
vi. Safety order volume scale = 2
vii. Safety order step scale = 1.4
viii. Max safety order = 5
2. On the “Properties” tab, set your initial capital, base currency, etc.
a. Initial capital – Default is 10,000 (Please use realistic values here. The amount here should be able to cover ALL your safety orders if they were triggered. Ideally, you should have funds left over and not use all trade capital.)
b. Base currency – Select your currency
c. Order Size - Not used. Use the “Inputs” tab to change your base order size.
d. Leave “Pyramiding” set to 999. This acts as a ceiling to the “Max safety orders” on the “Inputs” tab. It must always be higher than your “Max safety orders.” For example, if you set your “Max safety orders” to “4” and “Pyramiding” to “4” then it effectively means you have “3” “Max safety orders” and not “4” because it is counting each successive entry including the initial order.
e. “Commission” - Optional
f. “Verify price for limit orders” – Leave at zero. This does not change anything that I can tell.
g. Optional - Enter a value for “Commission”
h. Slippage – Optional. Slippage does not occur in backtesting but does occur in real trading but it can be simulated. Example use case for tracking performance of a real money bot: You enter the start date and time of your bot’s trade into this strategy and you notice some values are a little off due to slippage (average price, take profit, safety orders are not lining up) then you would go back here and increase the slippage until those lines up close enough with your actuals.
i. Margin for long positions – I don’t use this honestly.
j. Margin for short positions – I don’t use this honestly.
k. Recalculate “After order is filled” and “On every tick” – I don’t use this honestly.
3. “Style” tab
a. Ranged Volume Bar Coloring - You must disable bar coloring in any studies you added or this may not work properly
i. Color 0 – Default Yellow; appears when a volume breakout occurs
ii. Color 1 – Default Red; appears when a volume breakdown occurs
iii. Color 2 – Light Blue; appears when Close is higher than the Open
iv. Color 3 – Dark Blue; appears when the Close is lower than the Open
b. Take profit – Default Green; take profit line
c. Safety order – Default Light Blue; safety order line
d. No Safety Orders left – Default Red; when a trade runs out of safety orders, the line turns red and there is no safety orders left underneath to catch any further falling price movements.
e. Avg Position Price – Default Orange; your average position price for any given trade.
f. Take Profit Plot Area – Default Green; creates a highlighted area for your take profit
g. SO Plot Area – Default Light Blue; creates a highlighted area for your safety orders
h. Trades on chart – Show or hide your trades on the chart
i. Signal labels – Show or hide the trade signal labels on the chart
j. Quantity – Show or hide the trade quantity on the chart
Explanation of Chart lines and colors on chart
Cipher Twister - Long and ShortINTRO / NOTES:
This script is based on Market Cipher B Oscillator by Falcon
The difference in this script is that only the useful points are printed on the indicator, namely Long and Short Trade Execution signals to be used by a bot, namely the PT Bot.
The script also differs from the original that it has been upgraded to Pinescript v4
This oscillator can be used with ALL time frames, but generally works the best on 15 minute and 1 hour charts on ANY market, no matter, stock, forex, crypto, spot, futures, derivatives, Nasdaq etc...
DEFINITIONS:
This oscillator forms the foundation of Buy and Exit of Long and Short Trades.
There are 2 'Red' Lines at the top of the channel and 2 Green Lines at the bottom of the channel.
These two channels are set at default to be +53 / -53 and +60 / -60 respectively. These two lines will serve as the threshold point if one is to make cautious trades only.
There is a center line which divides the Oscillator into two parts. Above the center line, the market is in over bought territory and Below the center line is in over sold territory.
'Red' dots are drawn by the indicator to represent a potential Short (or a signal to exit from a Long position)
'Green' dots are drawn by the indicator to represent a potential Long (or a signal to exit from a Short position)
The 'Red' and 'Green' dots are draw when a Cross between both wt1 & wt2 cross, thus providing a fantastic indication of potential trend reversal and entry/exit of a position.
STRATEGY NOTES:
The strategy to use this indicator with for realistic and proper results would be to use it with an automated Trading Bot such as Profit Trailer (PT-BOT)
You could use this strategy manually, however it would mean you would need to sit in front of the screen all day and night long and activate the trades immediately after the 'red'/'green' dots are drawn. Usually this will result in non-optimal entries and exits as well as loss on various instances when a 'red' and 'green' dot are printed close together (which is usually when the market goes into correction/consolidation) and slow entries/exits will result in a loss rather than a small profit or exit at BE (Break Even)
ACTUAL STRATEGY (For use with automated bot)
To be used in conjunction with Heikin Ashi Candles for added cautionary measures
For LONGs ONLY
--------------------
1/ When 'Green' dot is drawn, ACTIVATE Long Position
(Use 1.5% Risk Management for each trade)
(Use Lot size based on 1.5% risk management and xLeverage (if any))
2/ Make sure bot Opens an SL (Stop Loss) value based on 1.5% Risk Management
3/ When 'Red' dot is drawn, CLOSE Long Position.
*If you want to add extra caution to your trade, only activate the trade if the 'Green' dot is BELOW the 'Green' Markers
*For added caution, use color coded Heikin Ashi candles to 'confirm' Activation and Closing of a trade in the bot configuration
---------------------------------------------------------------------------------------------------
For SHORTs ONLY
--------------------
1/ When 'Red' dot is drawn, ACTIVATE Short Position
(Use 1.5% Risk Management for each trade)
(Use Lot size based on 1.5% risk management and xLeverage (if any))
2/ Make sure bot Opens an SL (Stop Loss) value based on 1.5% Risk Management
3/ When 'Green' dot is drawn, CLOSE Short Position
*If you want to add extra caution to your trade, only activate the trade if the 'Red' dot is Above the Red Markers
*For added caution, use color coded Heikin Ashi candles to 'confirm' Activation and Closing of a trade in the bot configuration
---------------------------------------------------------------------------------------------------
Supplementary Notes:
Make sure that your bot configuration will only activate ONE TRADE when the 'Green'/'Red' dot appears.
Occasionally during high volatility , 'red'/'green' dots will appear intermittently before remaining drawn, thus the oscillator 'redraws' the dots during market movement.
There will be times where occasionally a 'green' dot or a 'red' dot will appear, the trade will be opened, but the trade will fail due to the market manipulation (algorithm/market maker bots/fake volume etc), to wipe out those trading on derivatives and futures markets using leverage. Do not worry about this, no bot can make 100% wins, no strategy will achieve 100% win ratio and one necessarily doesn't need a high win ratio when using strict money management practices with your trading for SL and lot size.
If you use this method, you will see great results, but again I must stress, using this method with a fully automated bot is the only way to achieve proper results.
Volatility Calculator for Daily Top and Bottom RangeWith the usage of ATR, applied on the close of the daily candle, I am calculated the volatility channels for the TOP and BOTTOM
Based on this logic, we can estimate, with a huge confidence factor, where the prices are going to be compressed for the trading day.
Having said that, lets take a look at the data gathered among the most important financial markets:
SPX
TOP CROSSES : 2116
BOT CROSSES : 1954
Total Daily Candles : 18908
Occurance ratio = 0.215
NDX
TOP CROSSES : 1212
BOT CROSSES : 1183
Total Daily Candles : 9386
Occurance ratio = 0.255
DIA
TOP CROSSES : 759
BOT CROSSES : 769
Total Daily Candles : 6109
Occurance ratio = 0.25
DXY
TOP CROSSES : 1597
BOT CROSSES : 1598
Total Daily Candles : 13156
Occurance ratio = 0.243
DAX
TOP CROSSES : 1878
BOT CROSSES : 1848
Total Daily Candles : 13155
Occurance ratio = 0.283
BTC USD
TOP CROSSES : 416
BOT CROSSES : 417
Total Daily Candles : 4290
Occurance ratio = 0.194
ETH USD
TOP CROSSES : 247
BOT CROSSES : 268
Total Daily Candles : 2452
Occurance ratio = 0.21
EUR USD
TOP CROSSES : 820
BOT CROSSES : 805
Total Daily Candles : 7489
Occurance ratio = 0.217
GOLD
TOP CROSSES : 1722
BOT CROSSES : 1569
Total Daily Candles : 13747
Occurance ratio = 0.239
USOIL
TOP CROSSES : 1077
BOT CROSSES : 1089
Total Daily Candles : 10231
Occurance ratio = 0.212
US 10Y
TOP CROSSES : 1302
BOT CROSSES : 1365
Total Daily Candles : 9075
Occurance ratio = 0.294
Based on this, we can assume with a very high confidence ( 70-80%) that the market is going to stay, within the range created from the BOT and TOP ATR points.
[laoowai]BNB_USDT_3m_3Commas_Bollinger_MACD_RSI_StrategyBNB_USDT _3m
Release Notes:
Time: 3min
Pair: BNB_USDT
Use: {{strategy.order.alert_message}}
What's the difference with 3Commas Bollinger Strategy by tedwardd:
1. Initial capital: 1210 USDT (10$ Base order / 400$*3 Safety order), if you will change, please change JUST safety order volume or number of safety orders 2-3
2. Using just 2(3) safety order (original script 4)
3. More high-performance strategy for BNB_USDT
4. Using MACD to sell order (original script take profit by scale), thanks Drun30 .
5. Using RSI to analyze the market conditions.
Need to change:
bot_id = input(title="3Commas Bot ID", defval=" YOUR DATA ")
email_token = input(title="Bot Email Token", defval=" YOUR DATA ")
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FAQ copy from tedwardd
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This strategy is intended for use as a way of backtesting various parameters available on 3commas.
The primary inputs for the strategy are:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
// USER INPUTS
Short MA Window - The length of the Short moving average
Long MA Window - The length of the Long moving average
Upper Band Offset - The offset to use for the upper bollinger offset
Lower Band Offset - The offset to use for the lower bollinger offset
Long Stop Loss % - The stop loss percentage to test
Long Take Profit % - The Take profit percentage to test
Initial SO Deviation % - The price deviation percentage required to place to first safety order
Safety Order Vol Step % - The volume scale to test
3Commas Bot ID - (self-explanatory)
Bot Email Token - Found in the deal start message for your bot (see link in the previous section for details)
3Commas Bot Trading Pair - The pair to include for composite bot start deals (should match the format of 3commas, not TradingView IE. USDT_BTC not BTCUSDT )
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Start Date, Month, Year and End Date, Month, and Year all apply to the backtesting window. By default, it will use as much data as it can give the current period select (there is less historical data available for periods below 1H) back as far as 2016 (there appears to be no historical data on Trading view much before this). If you would like to test a different period of time, just change these values accordingly.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Composite bot using a Bollinger band type trading strategy. While its primary intention is to provide users a way of backtesting bot parameters, it can also be used to trigger a deal start by either using the {{strategy.order.alert_message}} field in your alert and providing the bot details in the configuration screen for the strategy or by including the usual deal start message provided by 3commas.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Original script:
1. 3Commas Bollinger Strategy by tedwardd
2. Momentum Strategy ( BTC /USDT; 1h) - MACD (with source code) by Drun30
PYRAMIDING BTCUSDTPERP1H [ALERTS VERSION]BINANCE:BTCUSDTPERP
Hello
This my upgraded (ALERTs) version of my previous bots, uses diffrent indicators
WARING
THIS STRATEGY WORKS ONLY ON BTCUSDTPERP ON BINANCE 60MIN (like my previous ones) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- it depends on specyfic volume and wick based on binance
Soo, I was tried to make a bot with more trades to make more real results.
Trends are change, and the problem with configuration on bots is that, while we searching the best cofigurations , this was best configuration in the past,
to prepare bot for the futures moves , we have to make as much trades as possible.
This bot is pure definition of pyramiding, uses 2 entries, and when all the conditions are true, then will open a trades
The way it works is simple, bot use 6 difrent indicators to open longs/shorts and for the define trend
This specific configuration works the best at
TP: 1.4%
SL: 9%
This is bot only for lev 1x
Dont try it for bigger leverage, becouse when sl hits, which sometimes happend, the lost will be huge
Why sl is so big?
Bot is programed to replace sl with other entries
for example
close longs and open shorts
normal lose is around 3-5% (while trend is changed), so sl will only destroys results
this bot using 6 difrent indicators:
ADX
RSI
VOLUME
RANGE FILTER
MA 5-10-30
MACD by KivancOzbilgic
ADX - makes a solid view to trend without any scam wick :
Long only on green bars
Shorts only on red bars
That's helps my strategy to define a right trend
there is also a orange option for unidentified trends
RSI - value helps strategy to stop trade in right time
When RSI is overbought strategy don't open new longs
also when RSI is oversold strategy don't open new shorts
Volume - volume is the most important indicator for the strategy,
to avoid open trades on flat chart, new trades are open after a strong volume
wicks
RANGE FILTER- this indicator is for the better view of trends, define trends
MA 5-10-30 - like previous ones this is for better view of trends, and correctly define the trends
MACD by KivancOzbilgic - this indicator is based of MACD RELOADED by Kivanc Ozbilgic
Also like previous ones, indicator should help defined correct trends
Enjoy ;)
3Commas Bollinger StrategyThis strategy is intended for use as a way of backtesting various parameters available on 3commas.io composite bot using a bollinger band type trading strategy. While it's primary intention is to provide users a way of backtesting bot parameters, it can also be used to trigger a deal start by either using the {{strategy.open.alert_message}} field in your alert and providing the bot details in the configuration screen for the strategy or by including the usual deal start message provided by 3commas. You can find more information about how to do this from help.3commas.io
The primary inputs for the strategy are:
// USER INPUTS
Short MA Window - The length of the Short moving average
Long MA Window - The length of the Long moving average
Upper Band Offset - The offset to use for the upper bollinger offset
Lower Band Offset - The offset to use for the lower bollinger offset
Long Stop Loss % - The stop loss percentage to test
Long Take Profit % - The Take profit percentage to test
Initial SO Deviation % - The price deviation percentage required to place to first safety order
Safety Order Vol Step % - The volume scale to test
3Commas Bot ID - (self explanatory)
Bot Email Token - Found in the deal start message for your bot (see link in previous section for details)
3Commas Bot Trading Pair - The pair to include for composite bot start deals (should match format of 3commas, not TradingView IE. USDT_BTC not BTCUSDT)
Start Date, Month, Year and End Date, Month and Year all apply to the backtesting window. By default it will use as much data as it can given the current period select (there is less historical data available for periods below 1H) back as far as 2016 (there appears to be no historical data on Trading view much before this). If you would like to test a different period of time, just change these values accordingly.
Known Issues
Currently there are a couple of issues with this strategy that you should be aware of. I may fix them at some point in the future but they don't really bug me so this is more for informational purposes than a promise that they may one day be fixed.
Does not test trailing take profit
Number of safety orders and Safety Order Step Scale are currently not user configurable (must edit source code)
Using the user configuration to generate deal start message assumes you are triggering a composite bot, not a simple bot.
RSI Trend CryptoDear community,
Today I want to present you one of my favorite and simple trading bots: The RSI Trend.
This bot is based on the RSI, which normally is used as a trend reversal indicator. However, here it’s used as a trend finding indicator, often with great success. This bot making long-only trades, which is quite successful in bull-markets like the one we’re currently in.
In case you want to use an emergency exit for your trade, toggle the Emergency Exit parameter. During bull-markets it’s better in the long term to keep this option off.
Currently the bot only makes one trade at a time (pyramiding = 1), for higher risk and higher rewards you can increase this parameter. More than 5 is not advised.
I’ve optimized this bot on 15min time frame. It has some decent results for most cryptos on this TF, feel free to test this out.
In case you want to hook this bot up to your exchange, feel free to edit the ALERT messages in the code.
Default Trading Rules:
Long: RSI crosses over 35
Close Long: RSI crosses under 75
Emergency Exit: RSI crosses under 10
Ruckard TradingLatinoThis strategy tries to mimic TradingLatino strategy.
The current implementation is beta.
Si hablas castellano o espanyol por favor consulta MENSAJE EN CASTELLANO más abajo.
It's aimed at BTCUSDT pair and 4h timeframe.
STRATEGY DEFAULT SETTINGS EXPLANATION
max_bars_back=5000 : This is a random number of bars so that the strategy test lasts for one or two years
calc_on_order_fills=false : To wait for the 4h closing is too much. Try to check if it's worth entering a position after closing one. I finally decided not to recheck if it's worth entering after an order is closed. So it is false.
calc_on_every_tick=false
pyramiding=0 : We only want one entry allowed in the same direction. And we don't want the order to scale by error.
initial_capital=1000 : These are 1000 USDT. By using 1% maximum loss per trade and 7% as a default stop loss by using 1000 USDT at 12000 USDT per BTC price you would entry with around 142 USDT which are converted into: 0.010 BTC . The maximum number of decimal for contracts on this BTCUSDT market is 3 decimals. E.g. the minimum might be: 0.001 BTC . So, this minimal 1000 amount ensures us not to entry with less than 0.001 entries which might have happened when using 100 USDT as an initial capital.
slippage=1 : Binance BTCUSDT mintick is: 0.01. Binance slippage: 0.1 % (Let's assume). TV has an integer slippage. It does not have a percentage based slippage. If we assume a 1000 initial capital, the recommended equity is 142 which at 11996 USDT per BTC price means: 0.011 BTC. The 0.1% slippage of: 0.011 BTC would be: 0.000011 . This is way smaller than the mintick. So our slippage is going to be 1. E.g. 1 (slippage) * 0.01 (mintick)
commission_type=strategy.commission.percent and commission_value=0.1 : According to: binance . com / en / fee / schedule in VIP 0 level both maker and taker fees are: 0.1 %.
BACKGROUND
Jaime Merino is a well known Youtuber focused on crypto trading
His channel TradingLatino
features monday to friday videos where he explains his strategy.
JAIME MERINO STANCE ON BOTS
Jaime Merino stance on bots (taken from memory out of a 2020 June video from him):
'~
You know. They can program you a bot and it might work.
But, there are some special situations that the bot would not be able to handle.
And, I, as a human, I would handle it. And the bot wouldn't do it.
~'
My long term target with this strategy script is add as many
special situations as I can to the script
so that it can match Jaime Merino behaviour even in non normal circumstances.
My alternate target is learn Pine script
and enjoy programming with it.
WARNING
This script might be bigger than other TradingView scripts.
However, please, do not be confused because the current status is beta.
This script has not been tested with real money.
This is NOT an official strategy from Jaime Merino.
This is NOT an official strategy from TradingLatino . net .
HOW IT WORKS
It basically uses ADX slope and LazyBear's Squeeze Momentum Indicator
to make its buy and sell decisions.
Fast paced EMA being bigger than slow paced EMA
(on higher timeframe) advices going long.
Fast paced EMA being smaller than slow paced EMA
(on higher timeframe) advices going short.
It finally add many substrats that TradingLatino uses.
SETTINGS
__ SETTINGS - Basics
____ SETTINGS - Basics - ADX
(ADX) Smoothing {14}
(ADX) DI Length {14}
(ADX) key level {23}
____ SETTINGS - Basics - LazyBear Squeeze Momentum
(SQZMOM) BB Length {20}
(SQZMOM) BB MultFactor {2.0}
(SQZMOM) KC Length {20}
(SQZMOM) KC MultFactor {1.5}
(SQZMOM) Use TrueRange (KC) {True}
____ SETTINGS - Basics - EMAs
(EMAS) EMA10 - Length {10}
(EMAS) EMA10 - Source {close}
(EMAS) EMA55 - Length {55}
(EMAS) EMA55 - Source {close}
____ SETTINGS - Volume Profile
Lowest and highest VPoC from last three days
is used to know if an entry has a support
VPVR of last 100 4h bars
is also taken into account
(VP) Use number of bars (not VP timeframe): Uses 'Number of bars {100}' setting instead of 'Volume Profile timeframe' setting for calculating session VPoC
(VP) Show tick difference from current price {False}: BETA . Might be useful for actions some day.
(VP) Number of bars {100}: If 'Use number of bars (not VP timeframe)' is turned on this setting is used to calculate session VPoC.
(VP) Volume Profile timeframe {1 day}: If 'Use number of bars (not VP timeframe)' is turned off this setting is used to calculate session VPoC.
(VP) Row width multiplier {0.6}: Adjust how the extra Volume Profile bars are shown in the chart.
(VP) Resistances prices number of decimal digits : Round Volume Profile bars label numbers so that they don't have so many decimals.
(VP) Number of bars for bottom VPOC {18}: 18 bars equals 3 days in suggested timeframe of 4 hours. It's used to calculate lowest session VPoC from previous three days. It's also used as a top VPOC for sells.
(VP) Ignore VPOC bottom advice on long {False}: If turned on it ignores bottom VPOC (or top VPOC on sells) when evaluating if a buy entry is worth it.
(VP) Number of bars for VPVR VPOC {100}: Number of bars to calculate the VPVR VPoC. We use 100 as Jaime once used. When the price bounces back to the EMA55 it might just bounce to this VPVR VPoC if its price it's lower than the EMA55 (Sells have inverse algorithm).
____ SETTINGS - ADX Slope
ADX Slope
help us to understand if ADX
has a positive slope, negative slope
or it is rather still.
(ADXSLOPE) ADX cut {23}: If ADX value is greater than this cut (23) then ADX has strength
(ADXSLOPE) ADX minimum steepness entry {45}: ADX slope needs to be 45 degrees to be considered as a positive one.
(ADXSLOPE) ADX minimum steepness exit {45}: ADX slope needs to be -45 degrees to be considered as a negative one.
(ADXSLOPE) ADX steepness periods {3}: In order to avoid false detection the slope is calculated along 3 periods.
____ SETTINGS - Next to EMA55
(NEXTEMA55) EMA10 to EMA55 bounce back percentage {80}: EMA10 might bounce back to EMA55 or maybe to 80% of its complete way to EMA55
(NEXTEMA55) Next to EMA55 percentage {15}: How much next to the EMA55 you need to be to consider it's going to bounce back upwards again.
____ SETTINGS - Stop Loss and Take Profit
You can set a default stop loss or a default take profit.
(STOPTAKE) Stop Loss % {7.0}
(STOPTAKE) Take Profit % {2.0}
____ SETTINGS - Trailing Take Profit
You can customize the default trailing take profit values
(TRAILING) Trailing Take Profit (%) {1.0}: Trailing take profit offset in percentage
(TRAILING) Trailing Take Profit Trigger (%) {2.0}: When 2.0% of benefit is reached then activate the trailing take profit.
____ SETTINGS - MAIN TURN ON/OFF OPTIONS
(EMAS) Ignore advice based on emas {false}.
(EMAS) Ignore advice based on emas (On closing long signal) {False}: Ignore advice based on emas but only when deciding to close a buy entry.
(SQZMOM) Ignore advice based on SQZMOM {false}: Ignores advice based on SQZMOM indicator.
(ADXSLOPE) Ignore advice based on ADX positive slope {false}
(ADXSLOPE) Ignore advice based on ADX cut (23) {true}
(STOPTAKE) Take Profit? {false}: Enables simple Take Profit.
(STOPTAKE) Stop Loss? {True}: Enables simple Stop Loss.
(TRAILING) Enable Trailing Take Profit (%) {True}: Enables Trailing Take Profit.
____ SETTINGS - Strategy mode
(STRAT) Type Strategy: 'Long and Short', 'Long Only' or 'Short Only'. Default: 'Long and Short'.
____ SETTINGS - Risk Management
(RISKM) Risk Management Type: 'Safe', 'Somewhat safe compound' or 'Unsafe compound'. ' Safe ': Calculations are always done with the initial capital (1000) in mind. The maximum losses per trade/day/week/month are taken into account. ' Somewhat safe compound ': Calculations are done with initial capital (1000) or a higher capital if it increases. The maximum losses per trade/day/week/month are taken into account. ' Unsafe compound ': In each order all the current capital is gambled and only the default stop loss per order is taken into account. That means that the maximum losses per trade/day/week/month are not taken into account. Default : 'Somewhat safe compound'.
(RISKM) Maximum loss per trade % {1.0}.
(RISKM) Maximum loss per day % {6.0}.
(RISKM) Maximum loss per week % {8.0}.
(RISKM) Maximum loss per month % {10.0}.
____ SETTINGS - Decimals
(DECIMAL) Maximum number of decimal for contracts {3}: How small (3 decimals means 0.001) an entry position might be in your exchange.
EXTRA 1 - PRICE IS IN RANGE indicator
(PRANGE) Print price is in range {False}: Enable a bottom label that indicates if the price is in range or not.
(PRANGE) Price range periods {5}: How many previous periods are used to calculate the medians
(PRANGE) Price range maximum desviation (%) {0.6} ( > 0 ): Maximum positive desviation for range detection
(PRANGE) Price range minimum desviation (%) {0.6} ( > 0 ): Mininum negative desviation for range detection
EXTRA 2 - SQUEEZE MOMENTUM Desviation indicator
(SQZDIVER) Show degrees {False}: Show degrees of each Squeeze Momentum Divergence lines to the x-axis.
(SQZDIVER) Show desviation labels {False}: Whether to show or not desviation labels for the Squeeze Momentum Divergences.
(SQZDIVER) Show desviation lines {False}: Whether to show or not desviation lines for the Squeeze Momentum Divergences.
EXTRA 3 - VOLUME PROFILE indicator
WARNING: This indicator works not on current bar but on previous bar. So in the worst case it might be VP from 4 hours ago. Don't worry, inside the strategy calculus the correct values are used. It's just that I cannot show the most recent one in the chart.
(VP) Print recent profile {False}: Show Volume Profile indicator
(VP) Avoid label price overlaps {False}: Avoid label prices to overlap on the chart.
EXTRA 4 - ZIGNALY SUPPORT
(ZIG) Zignaly Alert Type {Email}: 'Email', 'Webhook'. ' Email ': Prepare alert_message variable content to be compatible with zignaly expected email content format. ' Webhook ': Prepare alert_message variable content to be compatible with zignaly expected json content format.
EXTRA 5 - DEBUG
(DEBUG) Enable debug on order comments {False}: If set to true it prepares the order message to match the alert_message variable. It makes easier to debug what would have been sent by email or webhook on each of the times an order is triggered.
HOW TO USE THIS STRATEGY
BOT MODE: This is the default setting.
PROPER VOLUME PROFILE VIEWING: Click on this strategy settings. Properties tab. Make sure Recalculate 'each time the order was run' is turned off.
NEWBIE USER: (Check PROPER VOLUME PROFILE VIEWING above!) You might want to turn on the 'Print recent profile {False}' setting. Alternatively you can use my alternate realtime study: 'Resistances and supports based on simplified Volume Profile' but, be aware, it might consume one indicator.
ADVANCED USER 1: Turn on the 'Print price is in range {False}' setting and help us to debug this subindicator. Also help us to figure out how to include this value in the strategy.
ADVANCED USER 2: Turn on the all the (SQZDIVER) settings and help us to figure out how to include this value in the strategy.
ADVANCED USER 3: (Check PROPER VOLUME PROFILE VIEWING above!) Turn on the 'Print recent profile {False}' setting and report any problem with it.
JAIME MERINO: Just use the indicator as it comes by default. It should only show BUY signals, SELL signals and their associated closing signals. From time to time you might want to check 'ADVANCED USER 2' instructions to check that there's actually a divergence. Check also 'ADVANCED USER 1' instructions for your amusement.
EXTRA ADVICE
It's advised that you use this strategy in addition to these two other indicators:
* Squeeze Momentum Indicator
* ADX
so that your chart matches as close as possible to TradingLatino chart.
ZIGNALY INTEGRATION
This strategy supports Zignaly email integration by default. It also supports Zignaly Webhook integration.
ZIGNALY INTEGRATION - Email integration example
What you would write in your alert message:
||{{strategy.order.alert_message}}||key=MYSECRETKEY||
ZIGNALY INTEGRATION - Webhook integration example
What you would write in your alert message:
{ {{strategy.order.alert_message}} , "key" : "MYSECRETKEY" }
CREDITS
I have reused and adapted some code from
'Directional Movement Index + ADX & Keylevel Support' study
which it's from TradingView console user.
I have reused and adapted some code from
'3ema' study
which it's from TradingView hunganhnguyen1193 user.
I have reused and adapted some code from
'Squeeze Momentum Indicator ' study
which it's from TradingView LazyBear user.
I have reused and adapted some code from
'Strategy Tester EMA-SMA-RSI-MACD' study
which it's from TradingView fikira user.
I have reused and adapted some code from
'Support Resistance MTF' study
which it's from TradingView LonesomeTheBlue user.
I have reused and adapted some code from
'TF Segmented Linear Regression' study
which it's from TradingView alexgrover user.
I have reused and adapted some code from
"Poor man's volume profile" study
which it's from TradingView IldarAkhmetgaleev user.
FEEDBACK
Please check the strategy source code for more detailed information
where, among others, I explain all of the substrats
and if they are implemented or not.
Q1. Did I understand wrong any of the Jaime substrats (which I have implemented)?
Q2. The strategy yields quite profit when we should long (EMA10 from 1d timeframe is higher than EMA55 from 1d timeframe.
Why the strategy yields much less profit when we should short (EMA10 from 1d timeframe is lower than EMA55 from 1d timeframe)?
Any idea if you need to do something else rather than just reverse what Jaime does when longing?
FREQUENTLY ASKED QUESTIONS
FAQ1. Why are you giving this strategy for free?
TradingLatino and his fellow enthusiasts taught me this strategy. Now I'm giving back to them.
FAQ2. Seriously! Why are you giving this strategy for free?
I'm confident his strategy might be improved a lot. By keeping it to myself I would avoid other people contributions to improve it.
Now that everyone can contribute this is a win-win.
FAQ3. How can I connect this strategy to my Exchange account?
It seems that you can attach alerts to strategies.
You might want to combine it with a paying account which enable Webhook URLs to work.
I don't know how all of this works right now so I cannot give you advice on it.
You will have to do your own research on this subject. But, be careful. Automating trades, if not done properly,
might end on you automating losses.
FAQ4. I have just found that this strategy by default gives more than 3.97% of 'maximum series of losses'. That's unacceptable according to my risk management policy.
You might want to reduce default stop loss setting from 7% to something like 5% till you are ok with the 'maximum series of losses'.
FAQ5. Where can I learn more about your work on this strategy?
Check the source code. You might find unused strategies. Either because there's not a substantial increases on earnings. Or maybe because they have not been implemented yet.
FAQ6. How much leverage is applied in this strategy?
No leverage.
FAQ7. Any difference with original Jaime Merino strategy?
Most of the times Jaime defines an stop loss at the price entry. That's not the case here. The default stop loss is 7% (but, don't be confused it only means losing 1% of your investment thanks to risk management). There's also a trailing take profit that triggers at 2% profit with a 1% trailing.
FAQ8. Why this strategy return is so small?
The strategy should be improved a lot. And, well, backtesting in this platform is not guaranteed to return theoric results comparable to real-life returns. That's why I'm personally forward testing this strategy to verify it.
MENSAJE EN CASTELLANO
En primer lugar se agradece feedback para mejorar la estrategia.
Si eres un usuario avanzado y quieres colaborar en mejorar el script no dudes en comentar abajo.
Ten en cuenta que aunque toda esta descripción tenga que estar en inglés no es obligatorio que el comentario esté en inglés.
CHISTE - CASTELLANO
¡Pero Jaime!
¡400.000!
¡Tu da mun!
SVMKR_UT_Bot_HMA_UCS_LRSThis Pine Script code is a TradingView study script titled "SVMKR_UT_Bot_HMA_UCS_LRS". It combines two separate trading indicators: the UT Bot (Ultimate Trailing Stop Bot) and the UCS_LRS (Linear Regression Slope) indicator.
UT Bot (Ultimate Trailing Stop Bot):
The UT Bot is designed to provide buy and sell signals based on a trailing stop strategy.
It calculates the trailing stop level using the Average True Range (ATR) and Heikin Ashi candle signals if enabled.
Buy signals are generated when the price crosses above the trailing stop, while sell signals occur when the price crosses below the trailing stop.
Additionally, buy and sell signals are visually represented on the chart with corresponding labels and shapes.
The script also includes options to customize the sensitivity of the trailing stop and to color the bars based on buy or sell signals.
Hull Moving Average (HMA):
This section calculates and plots the Hull Moving Average, a type of moving average that reduces lag and improves smoothing compared to traditional moving averages.
It uses the weighted moving average (WMA) to compute the HMA, which helps to identify trend direction and potential reversal points.
UCS_LRS (Linear Regression Slope):
The UCS_LRS indicator calculates the linear regression slope of the closing prices over a specified period.
It then applies exponential smoothing to the slope values and calculates an average slope.
Buy signals are generated when the current slope is greater than the average slope and positive, indicating an uptrend.
Conversely, sell signals are generated when the current slope is less than the average slope and negative, suggesting a downtrend.
The linear regression slope and its average are plotted on the chart, allowing traders to visually identify trend strength and potential reversal points.
Overall, this combined script provides traders with a comprehensive set of tools for trend following and momentum trading strategies, integrating trailing stop analysis, moving average smoothing, and linear regression slope analysis into a single script for technical analysis on TradingView charts.
USD Liquidity Conditions Index Swing Stock Strategy Original credits goes to @ElDoggo22 www.tradingview.com
I looked in the post created by him, of USD liquidity and I have noticed that if you are going to apply a percentile top and bottom to it, can become an interesting swing strategy for US Stocks.
So in this case I decided to create a 99th percentile for top and 4th percentile for bot with a big length, preferably 100+ candles, for this example i took 150.
Rules for entry :
Long : either bot or top lines are ascending
We exit long either the top line is descending, or we have sudden cross of the moving average with both top and bot within the same candle
Short: we enter short when we have a sudden cross down of the moving average with both top and bot within the same candle
We exit short when we have a cross over of the moving average with both top and bot within the same candle ( or we have a long entry condition)
If there are qny questions, please let me know !
X48 - Strategy | MA Type Cross + TPSL | Future&Spot | V.2Thank You For Open Source Code, This Strategy Ref. By 1.Simple Strategy Like MA Crossover For Long/Short or Spot Trade, 2. CDC Action Zone V.2 for BarPaint
This Strategy Mixing With MA Crossover Strategy and BarPaint By CDC Action Zone and TP/SL by Varbara
### How To Use Strategy : Setting EMA/SMA Crossover EMA/SMA, Any Value If You Want
For Long Position : Cross Up
For Short Position : Cross Down
Can Use With Spot Trade : Cross Up = Buy, Cross Down = Sell
TP/SL When Your OrderSize Change From any % Of Your TP/SL Value
### In Strategy Setting
Intitial Capital = Ex. 200
Order Size = Should Be Money Management Not Use 100% of Capital Ex. 10% of Capital (200$) = Order Size 20$
StopLoss and Take Profit = If You Run Trend TF 4H+ or 1D+ You Can Change TP% = 1,000% for nonlimit and Stop Loss 5 - 20% from your order size
Ex. Stoploss 15% = OrderSize / 100 x %SL = 20$/100 x 15% = 3$ Loss from order size 20$ (if you not set stop loss.)
Base Currency = (Your Currency) # Ex. USD
Commission = (Your Trading Fee) # Ex. Future Fee Can Check At Binance Fee Rate > www.binance.com > Choose Your Fee Type, Ex. USD M Future (Regular User) = 0.02 (Maker), 0.04 (Taker)
Commission Symbol Type = % # (Ref. By Binance Fee Rate)
### Notice ####
Default Setting It's Realistic From Normal Life Ex. Capital 200$ / Ordersize 20$ (10%)/ Commission 0.1% (Buy+Sell) / Slippage = 2 / TP = 1000% (nonlimit) / SL = 15%/OrderSize
Low Risk But High Return, Good Luck
### Bot Auto Trade by X4815162342 ###
if you wanna try my bot auto trade X48-3in1-bot : Contact My Line ID : x4815x
Full Command Alert For This Strategy If You Wanna See It's
'{"ex":"'+markettype+'","side": "'+longcommand+'", "amount": "@{{strategy.order.contracts}}", "symbol": "{{ticker}}", "passphrase": "'+passphrase+'","leverage":"'+str.tostring(leveragex)+'"}'
'{"ex":"'+markettype+'","side": "'+shortcommand+'", "amount": "@{{strategy.order.contracts}}", "symbol": "{{ticker}}", "passphrase": "'+passphrase+'","leverage":"'+str.tostring(leveragex)+'"}'
But Easy Than Full Command Just Use Thisssssss !! Strategy Be Manage Auto Long and Short or TPSL Position
You Don't Do Anything Just Use This Message to Alerts Message
{{strategy.order.alert_message}}
### If you don't use bot but just looking for strategy test ####
Just Pass Bot Setting Function It's Nothing Effect For Strategy !!!!!!
Let's Enjoy With Your Strategy BackTest 😁
Remember Beware Max drawdown%. I'm Recommend Lower Than 10% It's Very Good.
Fibonacci Zone Study w/Candles - R3c0nTraderCredits:
Thank you "eykpunter" for granting me permission to use "Fibonacci Zones" to create this study
What does this do? How is it different?
This study was created so it can be used with the strategy 'Fibonacci Zone DCA Strategy - R3c0nTrader' in order to generate buy/sell signals for a 3Commas bot.
I was not able to use "eykpunter's" "Fibonacci Zones" to create these signals as it was missing the code for this. To create the buy or sell signal you need to be able to create an alert for when the price moves through the Fib levels. Unfortunately, the "price" is not available to be selected when creating an alert with the original study. Hence the need to create this new study and to resolve the issue.
This study has overlay turned off by default so it will appear in a separate pane below your active chart. I did this so I can clearly view and separate the strategy from the study.
Steps Overview:
Add the study to your chart
Configure the study to match the Fib length you used in the strategy.
Create Alerts from the study to generate the buy or sell signals to 3Commas
The below steps for creating signals are just examples! Since there are numerous ways you can open or close a trade from a signal, please do your own testing. This cannot be understated.
Example of how to generate buy signals:
After adding the study, select the three dots for this study and click on "Add an alert on Fibonacci Zone Study /w Candles…"
Setup the condition to trigger the alert. If you want to initiate a buy when the price crosses over the top of the lower Fib zone (downtrend zone), then use the following:
Condition>Fibonacci Zone Study>Price High>Crossing Up>Fibonacci Zone Study>Top-Low Fib Border
Options>Once per bar
Expiration>Open-ended
Alert actions>Webhook URL (use the 3Commas webhook URL)
Alert name>Enter a name, "BUY Paper-Fib-Bot"
Message>Use the 3Commas message from the paper bot to open the trade
Example of how to generate sell signals:
After adding the study, select the three dots for this study and click on "Add an alert on Fibonacci Zone Study /w Candles…"
Setup the condition to trigger the alert. If you want to initiate a sell when the price reaches the top of the High Fib zone (uptrend zone), then try the following:
Condition>Fibonacci Zone Study>Price High>Crossing Up>Fibonacci Zone Study>Top-High Fib Border
(Note: I used "Crossing Up" but "Crossing" is another option; I just haven't tested it yet with a paper bot)
Options>Once per bar
Expiration>Open-ended
Alert actions>Webhook URL (use the 3Commas webhook URL)
Alert name>Enter a name, "SELL Paper-Fib-Bot"
Message>Use the 3Commas message from the paper bot to close the trade
5min Williams Fractals scalping (3commas)Another strategy I'm learning Pine Script on. It is inspired by a MoneyZG youtube strategy called "Easy 5 Minute Scalping Strategy (Simple to Follow Scalping Trading Strategy)".
Again this is a one order per trade strategy compatible with the 3commas bot (works also with the free 3commas subscription). This strategy is based on the signals from Williams Fractals, taking the signals in reverse - red triangle indicates a bottom and hence we go long. The green triangle indicates a top so we go short. By default these signals are only accepted if they occur between the two Emas. However, you can also turn this off and when a WF signal comes in, only the current price has to be between the Emas. Stop loss is set to the current Ema slow and the take profit is a multiple of the distance to the slow ema.
Like previously I have added different filters as well as the ability to view essential things like the WF signal and Emas. I hope the script will help you to be more successful and if so it would be great if you could share here your setups, or tips on what would be good to refine to make it an even a more profitable strategy. Kind of a community approach so that we help each other out :).
Instructions for the 3commas connector:
1. First, you need to prepare 3commas Long/Short bots that will only listen to custom TV signals.
2. Inputs for the 3commas bot can be found at the end of the user inputs.
3. Once you have entered the required details into the inputs, turn on 3commas comments. They should appear on the chart (looks messy).
4. Now you can add the alert where you should paste the 3commas Webhook URL: 3commas.io
5. For the alert message text insert the placeholder {{strategy.order.comment}} and delete the rest.
6. Once the alert is saved, you can turn off those 3commas comments to have a clearer chart.
7. With a new alert, the bot and trade should launch.
In the near future I would like to publish more scripts that will carry similar elements as the first two, incl. compatibility with 3commas (I don't have access to another bot system). I will choose some strategies myself, but I will also be glad for some tips on what strategy would be good to do and is still missing here on Tradingview (short youtube videos or brief strategy manuals would be great).
Thanks and keep it up
PS: My screen values starting at Long Target Profit and ending at Pullback NOT greater than: 1.5; 1.5; 0; ON; 1; 2; OFF; 17; 36; ON; 0.05; ON; Chart; 14; 46; 50; 48.5; 51; OFF; 1; ON; 4; 2.