theautotrading

Nifty 50 5mint Strategy

theautotrading 업데이트됨   

The script defines a specific trading session based on user inputs. This session is specified by a time range (e.g., "1000-1510") and selected days of the week (e.g., Monday to Friday). This session definition is crucial for trading only during specific times.

Lookback and Breakout Conditions:

The script uses a lookback period and the highest high and lowest low values to determine potential breakout points. The lookback period is user-defined (default is 10 periods).
The script also uses Bollinger Bands (BB) to identify potential breakout conditions. Users can enable or disable BB crossover conditions. BB consists of an upper and lower band, with the basis.
Additionally, the script uses Dema (Double Exponential Moving Average) and VWAP (Volume Weighted Average Price). Users can enable or disable this condition.

Buy and Sell Conditions:

Buy conditions are met when the close price exceeds the highest high within the specified lookback period, Bollinger Bands conditions are satisfied, Dema-VWAP conditions are met, and the script is within the defined trading session.
Sell conditions are met when the close price falls below the lowest low within the lookback period, Bollinger Bands conditions are satisfied, Dema-VWAP conditions are met, and the script is within the defined trading session.
When either condition is met, it triggers a "long" or "short" position entry.

Trailing Stop Loss (TSL):

Users can choose between fixed points (SL by points) or trailing stop (Profit Trail).
For fixed points, users specify the number of points for the stop loss. A fixed stop loss is set at a certain distance from the entry price if a position is opened.
For Profit Trail, users can enable or disable this feature. If enabled, the script uses a "trail factor" (lookback period) to determine when to adjust the stop loss.
If the price moves in the direction of the trade and reaches a certain level (determined by the trail factor), the stop loss is adjusted, trailing behind the price to lock in profits.
If the close price falls below a certain level (lowest low within the trail factor(lookback)), and a position is open, the "long" position is closed (strategy.close("long")).
If the close price exceeds a certain level (highest high within the specified trail factor(lookback)), and a position is open, the "short" position is closed (strategy.close("short")).
Positions are also closed if they are open outside of the defined trading session.

Background Color:

The script changes the background color of the chart to indicate buy (green) and sell (red) signals, making it visually clear when the strategy conditions are met.
In summary, this script implements a breakout trading strategy with various customizable conditions, including Bollinger Bands, Dema-VWAP crossovers, and session-specific rules. It also includes options for setting stop losses and trailing stop losses to manage risk and lock in profits. The "trail factor" helps adjust trailing stops dynamically based on recent price movements. Positions are closed under certain conditions to manage risk and ensure compliance with the defined trading session.

CE=Buy, CE_SL=stoploss_buy, tCsl=Trailing Stop_buy.
PE=sell, PE_SL= stoploss_sell, tpsl=Trailing Stop_sell.

Remember that trading involves inherent risks, and past performance is not indicative of future results. Exercise caution, manage risk diligently, and consider the advice of financial experts when using this script or any trading strategy.
릴리즈 노트:
Update added Timeframe option for Lookback period.
also added profit/loss visualization on the chart_Code is copied from ZenAndTheArtOfTrading www.tradingview.com/...nAndTheArtOfTrading/

오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

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

차트에 이 스크립트를 사용하시겠습니까?