// Calculate the long and short entry levels long_entry_level = high + atr * multiplier short_entry_level = low - atr * multiplier
// Plot the entry levels on the chart plot(long_entry_level, color=color.green) plot(short_entry_level, color=color.red)
// Set up long and short entry conditions long_entry_condition = crossover(close, long_entry_level) short_entry_condition = crossunder(close, short_entry_level)
// Enter long and short trades when the conditions are met if (long_entry_condition) strategy.entry(id="Long", long=true, comment="Long")
if (short_entry_condition) strategy.entry(id="Short", long=false, comment="Short")
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.