FX:EURUSD   유로 / 미국 달러
//@version=5
strategy("My Strategy", overlay=true, initial_capital=100, currency=currency.USD)

// Define strategy variables
var float last_buy_price = na

// Define strategy parameters
var float take_profit = input.float(1.5, title="Take Profit")
var float stop_loss = input.float(0.9, title="Stop Loss")

// Define strategy entry conditions
entry_condition = // Define your entry conditions here

// Define strategy exit conditions
exit_condition = // Define your exit conditions here

// Execute strategy
if entry_condition
strategy.entry("Buy", strategy.long)
last_buy_price := close

if exit_condition
strategy.close("Buy")

// Define take profit and stop loss
strategy.exit("Take Profit/Stop Loss", "Buy", profit=last_buy_price*take_profit, loss=last_buy_price*stop_loss)
면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.