TRADE INDICATOR WITH ALERTS - Pine Script
Budget: $30 – $250 USD
INTRODUCTION
The task is to develop a technical analysis indicator in Pine script for TradingView platform with trading information display, trading alert function and additional information paint functionality.
Additionally implement this functionality as a TRADING STRATEGY for TradingView.
TECHNICAL REQUIREMENTS
The indicator should be fully configurable and have all the values used in calculation available as settings.The indicator will use following functions:
Stoch function
EMA function
ATR function
An indicator source should be taken from the chart where the indicator has been placed to.
INDICATOR SETTINGS
Following values should be available as indicator settings:
Number of bars to close above/below EMA to filter the signal as X
EMA period as EP
Stop size in ATRs (float) as S1
Entry 1 level (+- ATRs from EMA) as E1
Entry 2 level (+- ATRs from EMA) as E2
Target 1 size in ATR (float) as T1
Target 2 size in ATR (float) as T2
K line trigger level (+- from 50 level, i.e. for level 30 or 70 the value should be 20) as KT
K line invalidation level (+- from 50 level, i.e. 50 levels should be set as 0, 40 level for long trade or 60 level for short trade should be set as -10, 60 level for long trade or 40 level for short trade should be set as 10) as KI
Account value in $
Trade risk in $
INDICATOR PAINT FUNCTIONS
Additionally to posting numerical information about values describe above (possibly as anchored text object), it would be very useful to paint following lines on the price chart:
Entry levels line as a breaking line
Stop level line as a breaking line
Target 1 price level line as a breaking line
Target 2 price level line as a breaking line
Also, on additional pane, similarly to how standard Stochastics indicator is painting it would be great to display:
%K line
signal levels (taken from the config value for activation levels)
invalidation levels line (taken from the config value for invalidation levels)
TRADING ALERTS
Trade signal should provide with an alert giving the following information:
Entry level prices for E1 and E2
Position size for E1 and E2
Stop price
T1 and T2 prices
Position leverage for E1 and E2
Trade signals should be calculated on every bar close.
Target prices are calculated as EMA + T1xATR and T2xATR for longs, and EMA-T1xATR and EMA-T2xATR for short positions.
Stop price is calculated as EMA - S x ATR.
Trading position should be calculated as
Alert function should have a configurable check box in indicator settings, allowing it to be switched on and off. A check box allowing it to send alert emails to the account address should be implemented.
Alert should send an email message, sound signal but generate no pop-up. Trade information should be painted on the main price pane.
LONG TRADE
Trading alert should be generated when following conditions are met:
STOCH %K line crosses the trigger level
Last X bars closes are above EMA
SIGNAL INVALIDATION
Long signal is invalidated when the %K line crosses below the invalidation level. An alert about the trade invalidation should be fired.
Alternatively, if the last X bars close are below the EMA, the trade signal is invalidated and alert should be fired.
SHORT TRADE
Trading alert should be generated when following conditions are met:
STOCH %K line crosses trigger level
Last X bar closes are below EMA
SIGNAL INVALIDATION
Short signal is invalidated when the %K line crosses above the invalidation level. An alert about the trade invalidation should be fired.
Alternatively, if the last X bars close are below the EMA, the trade signal is invalidated and an alert should be fired.
The task is to develop a technical analysis indicator in Pine script for TradingView platform with trading information display, trading alert function and additional information paint functionality.
Additionally implement this functionality as a TRADING STRATEGY for TradingView.
TECHNICAL REQUIREMENTS
The indicator should be fully configurable and have all the values used in calculation available as settings.The indicator will use following functions:
Stoch function
EMA function
ATR function
An indicator source should be taken from the chart where the indicator has been placed to.
INDICATOR SETTINGS
Following values should be available as indicator settings:
Number of bars to close above/below EMA to filter the signal as X
EMA period as EP
Stop size in ATRs (float) as S1
Entry 1 level (+- ATRs from EMA) as E1
Entry 2 level (+- ATRs from EMA) as E2
Target 1 size in ATR (float) as T1
Target 2 size in ATR (float) as T2
K line trigger level (+- from 50 level, i.e. for level 30 or 70 the value should be 20) as KT
K line invalidation level (+- from 50 level, i.e. 50 levels should be set as 0, 40 level for long trade or 60 level for short trade should be set as -10, 60 level for long trade or 40 level for short trade should be set as 10) as KI
Account value in $
Trade risk in $
INDICATOR PAINT FUNCTIONS
Additionally to posting numerical information about values describe above (possibly as anchored text object), it would be very useful to paint following lines on the price chart:
Entry levels line as a breaking line
Stop level line as a breaking line
Target 1 price level line as a breaking line
Target 2 price level line as a breaking line
Also, on additional pane, similarly to how standard Stochastics indicator is painting it would be great to display:
%K line
signal levels (taken from the config value for activation levels)
invalidation levels line (taken from the config value for invalidation levels)
TRADING ALERTS
Trade signal should provide with an alert giving the following information:
Entry level prices for E1 and E2
Position size for E1 and E2
Stop price
T1 and T2 prices
Position leverage for E1 and E2
Trade signals should be calculated on every bar close.
Target prices are calculated as EMA + T1xATR and T2xATR for longs, and EMA-T1xATR and EMA-T2xATR for short positions.
Stop price is calculated as EMA - S x ATR.
Trading position should be calculated as
Alert function should have a configurable check box in indicator settings, allowing it to be switched on and off. A check box allowing it to send alert emails to the account address should be implemented.
Alert should send an email message, sound signal but generate no pop-up. Trade information should be painted on the main price pane.
LONG TRADE
Trading alert should be generated when following conditions are met:
STOCH %K line crosses the trigger level
Last X bars closes are above EMA
SIGNAL INVALIDATION
Long signal is invalidated when the %K line crosses below the invalidation level. An alert about the trade invalidation should be fired.
Alternatively, if the last X bars close are below the EMA, the trade signal is invalidated and alert should be fired.
SHORT TRADE
Trading alert should be generated when following conditions are met:
STOCH %K line crosses trigger level
Last X bar closes are below EMA
SIGNAL INVALIDATION
Short signal is invalidated when the %K line crosses above the invalidation level. An alert about the trade invalidation should be fired.
Alternatively, if the last X bars close are below the EMA, the trade signal is invalidated and an alert should be fired.
Related categories:
Pine Script