This strategy is practically the same as before here, just it is revised with longer time frame for better backtesting. And it has modifiable input tab.
Strategy Description: It buys when the price dip at 2-week-low. The take profit is set at 3% and stop loss at 1%.
Potential ROI Monthly (in sideway): 0-10%
Recommended Settings:
Pair: MATICUSDT, OPUSDT, ATOMUSDT, ARBUSDT
Time frame: 15mins (*Optional: You can use TF5min, but adjust the Number of Candles = 4100)
Initial Capital: 100
Base Currency: Default
Order Size: 100% of equity
Pyramiding: 1 order
Commission: 0.1 %
Take Profit: 3%
Stop Loss: 1%
//@version=4
strategy("Buy2weeksLow-TF15min[www.capayam.com]", overlay=true)
// Input for the number of candles
num_candles = input(1344, title="Number of Candles", minval=1)
// Define the candles low price
low_candles = lowest(low, num_candles)
// Define the buy condition
buy_condition = low <= low_candles
// Create the buy order
if buy_condition
strategy.entry("Buy", strategy.long)
// Input for take profit percentage
tp_percentage = input(3, title="Take Profit Percentage", minval=0, maxval=10)
// Calculate take profit level
tp_price = close * (1 + tp_percentage / 100)
// Create the take profit order
strategy.exit("Take Profit", "Buy", limit=tp_price)
// Input for stop loss percentage
sl_percentage = input(1, title="Stop Loss Percentage", minval=0, maxval=5)
// Calculate stop loss level
sl_price = close * (1 - sl_percentage / 100)
// Create the stop loss order
strategy.exit("Stop Loss", "Buy", stop=sl_price)
// Plot the candles low for reference
plot(low_candles, color=color.new(color.red, 0), linewidth=2, title="Low Candles")
Comments
Post a Comment