//@version=2
strategy("ProfitStrategy01", overlay=true)
// Simple Profit making strategy by joinfree
Phigh = (open>close?open:close)
Plow = (open>close?close:open)
longC = (strategy.position_size Phigh) and (Plow > Plow) and (close > open)
strategy.entry("buy", strategy.long, 100000, when=longC)
strategy.exit("buy", "buy", 100000, profit=200, stop=50)
shortC = (strategy.position_size Phigh) and (Plow > Plow) and (close < open)
strategy.entry("sell", strategy.short, 100000, when=shortC)
strategy.exit("sell", "sell", 100000, profit=200, stop=50)
strategy("ProfitStrategy01", overlay=true)
// Simple Profit making strategy by joinfree
Phigh = (open>close?open:close)
Plow = (open>close?close:open)
longC = (strategy.position_size Phigh) and (Plow > Plow) and (close > open)
strategy.entry("buy", strategy.long, 100000, when=longC)
strategy.exit("buy", "buy", 100000, profit=200, stop=50)
shortC = (strategy.position_size Phigh) and (Plow > Plow) and (close < open)
strategy.entry("sell", strategy.short, 100000, when=shortC)
strategy.exit("sell", "sell", 100000, profit=200, stop=50)
//@version=2 strategy("ProfitStrategy01", overlay=true) // Simple Profit making strategy by joinfree Phigh = (open>close?open:close) Plow = (open>close?close:open) longC = (strategy.position_size <= 0) and (Phigh[1] > Phigh[0]) and (Plow[0] > Plow[1]) and (close[0] > open[0]) strategy.entry("buy", strategy.long, 100000, when=longC) strategy.exit("buy", "buy", 100000, profit=200, stop=50) shortC = (strategy.position_size <= 0) and (Phigh[1] > Phigh[0]) and (Plow[0] > Plow[1]) and (close[0] < open[0]) strategy.entry("sell", strategy.short, 100000, when=shortC) strategy.exit("sell", "sell", 100000, profit=200, stop=50)