This strategy is a manual buy and sell alert tool that can set buy price, sell price and other parameters. When the price triggers the conditions, it will issue a buy or sell alert.
This strategy is a non-automated manual trading tool. It can generate “alerts” for users to buy and sell at preset prices. Users can set the following:
The strategy can be easily tested by changing the cycle value and setting value.
In this way, users can manually determine the trading opportunity based on the alert information without the need for automated order placement, which is more flexible.
To reduce risks, it is recommended to use stop loss to limit losses; pay close attention to the market at critical moments and operate in a timely manner; and conduct multi-round testing to optimize parameters.
With these optimizations, the tool can be more user-friendly and intelligent to improve the efficiency of manual trading.
As a tool to assist manual trading, the biggest advantage of this strategy is flexible operation, which allows users to fully determine trading opportunities based on their own judgment, compared to automated trading strategies. At the same time, it also provides parameter setting functions for users to easily test different trading strategies, verify trading ideas, and serve multiple purposes. Of course, as a tool, it also requires users to continuously optimize and improve it so that it can adapt to more complex trading needs and play a greater role.
/*backtest start: 2024-01-21 00:00:00 end: 2024-02-20 00:00:00 period: 1h basePeriod: 15m exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // © MGTG title_name = 'Manual Buy & Sell Alerts' //@version=5 strategy( title=title_name, overlay=true, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=100, pyramiding=1, commission_type=strategy.commission.percent, commission_value=0.1) // Period sTime = input(timestamp("2020-01-01"), "Start", group="Period", inline='1') eTime = input(timestamp("2030-01-01"), "End", group="Period", inline='2') inDateRange = true // Bot Set-up buy_type = input.string('stop', 'Buy Type', group='Buy&Sell', inline='1', options=['stop', 'limit']) buy_price = input.float(49000, 'Buy Price', group='Buy&Sell', inline='1') target_price = input.float(51000, 'Target Price', group='Buy&Sell', inline='2') stop_price = input.float(47000, 'Stop Price', group='Buy&Sell', inline='2') avg_price = strategy.position_avg_price division = 1 // Alert message AlertLong=input.string("Buy message", "Buy Alert Message", group='Alert set-up', inline='1') AlertExit=input.string("Sell message", "Sell Alert Message", group='Alert set-up', inline='1') plot(buy_price, 'Buy Price', color=color.new(#009688, 0), style=plot.style_linebr, offset=1) plot(target_price, 'Take Profit', color=color.new(color.orange, 0), style=plot.style_linebr, offset=1) plot(stop_price, 'Safety', color=color.new(color.aqua, 0), style=plot.style_linebr, offset=1) posSize = strategy.equity / close strategy.exit("sell", "buy", limit=target_price, stop=stop_price, alert_message=AlertExit) longCondition = inDateRange and strategy.position_size == 0 if longCondition and buy_type == 'stop' strategy.entry("buy", strategy.long, qty=posSize, stop=buy_price, when=close < buy_price, comment="buy_STOP", alert_message=AlertLong) if longCondition and buy_type == 'limit' strategy.entry("buy", strategy.long, qty=posSize, limit=buy_price, when=close > buy_price, comment="buy_LIMIT", alert_message=AlertLong)