Select Page

Log XZ Strategy for TradingView

Strategy Premise

The strategy takes either an exponential moving average or an RSI moving average as input. It then calculates a natural log return on the same and plots the difference between the last candle and the 4th last candle, essentially signifying a change in trend over the past 5 candles and generating a signal on the same.

Log XZ Strategy for TradingView

Strategy Logic

Long Entry: Send LE when LogXZ crosses above 0

Long Exit: Either when SL or Target is hit. If SL/TGT is not hit and LogXZ goes below zero, send LX and SE

Short Entry: Send SE when LogXZ crosses below 0

Short Exit: Either when SL or Target is hit. If SL/TGT is not hit and LogXZ crosses above 0, send SX and LE

LogXZ for TradingView Charts

Z Length: Number of bars to lookback to

Trade Quantity: This is used to specify the trade quantity 

Custom Stop Loss in Points: Movement in chart price against the momentum which will trigger exit

Custom Target in Points: Movement in chart price against the momentum which will trigger exit

TradingView Settings

Step 1: Download the PineScrip Algo

Step 2: Open desired chart in TradingView with normal candlestick. Select desired timeframe of the chart.

Go to the Pine Editor section, remove the default code, paste the downloaded code, save the file and add to chart.

Step 3: Once Strategy is applied to the chart, click on settings to optimize parameters for your own trading

Step 4: Setting Up Alert

Before setting up an alert make sure that You have selected the desired script, timeframe, strategy settings, API bridge is configured and running. Click in settings add alert and paste {{strategy.order.comment}} in the message box.

Important: Do not change any settings during live trading.

NOTE: The pine script works both with webhook alerts (TV Pro plan) and normal popup alerts (TV free plan).