ATRTS
The Average True Range (ATR) indicator measures volatility in the price of a security. It was developed by J. Welles Wilder Jr. and introduced in his 1978 book, "New Concepts in Technical Trading Systems." The ATR calculation takes into account the high, low, and closing prices for a given period, typically 14 days, to generate an average range of price movement.
Traders can use ATR to determine the level of risk associated with a particular trade. When the ATR value is high, it suggests that the security is experiencing greater fluctuations in price, indicating higher volatility and potential risk. Conversely, a low ATR value indicates lower price movement and less potential risk.
By using ATR to set trailing stops, traders can automate their buy and sell signals based on changes in volatility. To calculate the upper and lower limits using ATR, you can use the configurable ATRX
multiplier. The resulting values are known as ATR short and ATR long, respectively. Traders can then use these limits to determine when to enter or exit a trade based on changes in volatility. ATR does not provide information about price direction, it is strongly recommended to use an additional momentum indicator like RSI.
Trailing stops
Using the configurable ATRX
multiplier for ATR, a lower and upper trailing stop are calculated.
- The lower limit, called
ATR short
, is calculated by substracting the result ofATRX
from next rounds bid. - The upper limit, called
ATR long
, is calculated by adding the result ofATRX
to next rounds ask.
How to work with it
Buy method conditions
A buy order is allowed when the ask price crosses up ATR long.
Sell method conditions
A sell order is allowed when the bid price crosses under ATR short and price is above the break-even point.
Trading example
Example of how trading with this strategy can perform. Details and settings
Buy settings
Buy settings are the primary trigger for buy orders. These parameters control the execution of buy orders when using atrts
as buy method.
Buy enabled
- Description
- Values
- Order types
- Name
Set this to false to prevent Gunbot from placing buy orders.
Values: true or false
Default value: true
Affects | Does not affect |
---|---|
Strategy buy | Strategy sell |
DCA buy | Stop limit |
RT buy | Close |
RT buyback | RT sell |
Parameter name in config.js
: BUY_ENABLED
Sell settings
Sell settings are the primary trigger for sell orders. These parameters control the execution of sell orders when using atrts
as sell method.
Sell enabled
- Description
- Values
- Order types
- Name
Set this to false to prevent Gunbot from placing sell orders.
Values: true or false
Default value: true
Affects | Does not affect |
---|---|
Strategy sell | Strategy buy |
Stop limit | RT buy |
RT sell | RT buyback |
Close | |
DCA buy |
Parameter name in config.js
: SELL_ENABLED
Gain
- Description
- Values
- Order types
- Name
This sets the minimum target for selling when DOUBLE_CHECK_GAIN
is enabled.
Values: numerical – represents a percentage.
Default value: 0.5
Affects | Does not affect |
---|---|
Strategy sell | Strategy buy |
RT buy | |
RT buyback | |
RT sell | |
Close | |
DCA buy | |
Stop limit | |
Parameter name in config.js
: GAIN
Indicator settings
Relevant indicators for trading with ATRTS
These settings have a direct effect on trading with atrts
.
Period
- Description
- Values
- Order types
- Name
This sets the candlestick period used for trading, this affects all indicators within the strategy.
Only use supported values. The trading settings editor suggests valid values for the selected exchange..
Setting a short period allows you to trade on shorter trends, but be aware that these will be noisier than longer periods.
Values: numerical– represents candlestick size in minutes.
Default value: 15
Affects | Does not affect |
---|---|
Strategy sell | RT buy |
Strategy buy | RT buyback |
DCA buy (when using an indicator to trigger) | RT sell |
Close | |
Stop limit |
Parameter name in config.js
: PERIOD
ATRx
- Description
- Values
- Order types
- Name
This value defines the multiplier used for calculation of the lower and upper limits for trading with atrts
When set to 5, ATR gets multiplied by 5 and the result gets subtracted from next rounds bid & added to next rounds ask to set the limits.
Values: numerical - represents a multiplier for ATR.
Default value: 0.5
Affects | Does not affect |
---|---|
Strategy sell | RT buy |
Strategy buy | RT buyback |
RT sell | |
Close | |
Stop limit | |
DCA buy |
Parameter name in config.js
: ATRX
ATR Period
- Description
- Values
- Order types
- Name
The number of periods used for calculating ATR.
Values: numerical, represents a number of periods.
Default value: 14
Affects | Does not affect |
---|---|
Strategy sell | RT buy |
Strategy buy | RT buyback |
RT sell | |
Close | |
Stop limit | |
DCA buy |
Parameter name in config.js
: ATR_PERIOD