Duyck

ATR Targets - JD

A simple visual representation of ATR trading targets.
The indicator shows ATR targets (TP and SL) from the last swing points (if you entered there)

There is an option to chose targets for a long or short position.


JD .
#NotTradingAdvice #DYOR

I build these indicators for myself and provide them open source, to use for free to use and improve upon,
as I believe the best way to learn is toghether.
If, however, you value these contributions, feel free to leave a little something in the tip-jar for my next coffee break ;-)
BTC: 1G9xXYWSoxJR2ikkB7Px6RwBLC5pjHmwZD
版本注释: Changed the entry value to the "close" at the time of the "pivot signal" instead of the pivot value itself, to have more realistic entry and target points.

JD.
版本注释: Added the option to chose between "Average True Range" (ATR) and "Average Pivot Range" (APR) trading targets.

The "APR" or "Average Pivot Range" is an indicator I created that calculates the difference between the highest and the lowest points of the last price swing (the last Pivot Range) and takes an average of that "swing amplitude" over a given lookback period.

The indicator shows ATR targets (TP and SL) from the close of the candle when the swing is detected (to give a realistic entry point)
or, in the case of APR, at the last high or low swing points (to show the likely expected extend of the move to the next swing point).

For the APR, the Average Range is calculated seperately for the 'up" and "down" moves, so the expected up move will be different to an expected down move,
because of that a factor of "1" is recommended for both TP and SL when using APR.

JD.
版本注释: Changed screenshot to APR version

JD.
版本注释: Changed faulty logic in APR targets.

JD.
版本注释: Updated script to separate the zones better.
Thanks to Scarff for the code!!!

JD.
版本注释: Modified the averaging logic and removed errors in target calculations for APR

JD.
版本注释: code cleanup
从常用的脚本中删除 添加到常用的脚本
Disclaimer.
I AM NOT A FINANCIAL ADVISOR.
THESE IDEAS ARE NOT ADVICE AND ARE FOR EDUCATION PURPOSES ONLY.
ALWAYS DO YOUR OWN RESEARCH!
JD.
A little tip is always nice!
BTC: 1G9xXYWSoxJR2ikkB7Px6RwBLC5pjHmwZD
http://paypal.me/jorisduyck
Several functions can be selected.
this is the ATR based version (TP x 1,SL x 1.5)

this is the APR based version (TP x 1, SL x 1)


The indicator can also be used as a Trailing Stop,
for clarity you can deselect the TP line to use as TS
ATR based

APR based


You can also chose to color the entry, TP and SL bars.
回复
@Duyck, i'm in a deep backtesting fase with this "indicator". Is it possible to change the code so TP also can be uneven numbers? - 1,5 and so on.

Kindly Jonas
回复
Duyck jonasstigmadsen
@jonasstigmadsen, I semm to have looked over that,
just change:

TP_fact=input(1,title="TP factor x ATR/APR")

to

TP_fact=input(1.0,title="TP factor x ATR/APR")

and you should be able to insert decimanl numbers.

Gr,
JD.
回复
首页 股票筛选器 外汇筛选器 加密货币筛选器 财经日历 如何运作 图表功能 价格 网站规则 版主 网站 & 经纪商解决方案 插件 图表解决方案 帮助中心 功能请求 博客 & 新闻 常见问题 维基百科 Twitter
概述 个人资料设置 账号和账单 TradingView代币 我的客服工单 帮助中心 已发表观点 粉丝 正在关注 私人消息 聊天 退出