QuantNomad

Parabolic SAR Strategy (on close) [QuantNomad]

Created a Parabolic SAR strategy where price has to close under/above the level before for it to reverse. This way it should be a bit more stable and protect you from false breakouts.
It was impossible to adjust the built-in "sar" function so I implemented PSAR from scratch. So if you're interested in how it's work inside you can check the code and probably adjust to your need if you have a custom modification of PSAR in your mind.
릴리즈 노트: Added "Entry on Nth trend bar" parameter. Now you can specify on which trends bar do you want to reverse position. That can help you to filter out noice and skip 1-2 bars trends.
즐겨찾기 스크립트에서 빼기 즐겨찾기 스크립트에 넣기
Courses:
PineScript Programming: https://qntly.com/pinepro
TradingView Essential: https://qntly.com/tve

Access to Pro Indic.: https://qntly.com/proind

YouTube: https://qntly.com/youtube
Discord: https://qntly.com/discord
Telegram: https://qntly.com/tel

코멘트

Is there anyway to make a ray line come out at that arrow point so that they are easier to see?
응답
QuantNomad PivitolAve
@PivitolAve, by arrow point you mean entry price for trades?
응답
PivitolAve QuantNomad
@QuantNomad, yup. :)
응답
QuantNomad PivitolAve
@PivitolAve, You can manually record open price based on signal and plot them as a line.
응답
PivitolAve QuantNomad
@QuantNomad, That's how I've been doing it. Sounds good. Great indicator. It's great on the higher TFs.
응답
Hi @QuantNomad , thanks for sharing this. I have been manually looking at PSAR as an indicator for awhile now and came across your strategy here. I'm thinking of ways to reduce the noise of the entry/exit triggers and am wondering if having a long/short entry only if the PSAR has had 3 consecutive plots in the same direction (i.e. 3 green or 3 red) would work. What do you think? I'm keen to test it out but not sure how to edit your existing script to reflect this amendment. Can you advise? Many thanks in advance
응답
QuantNomad yeojingcheng
@yeojingcheng, hm well it might work. I will take a look when will have some free time.
you can try something like this:

strategy.entry("Long", true, when = trend_dir == 1 and trend_dir == 1 and trend_dir == 1)
strategy.entry("Short", false, when = trend_dir == -1 and trend_dir == -1 and trend_dir == -1)
응답
Hi, first of all thanks for sharing with us plebs your script. I have a question as to recognize where exactly the longs or shorts are closed. Because with the small arrows it is not clear, at least for me. I look forward to hear from you.
응답
QuantNomad giacomo.ferrari15
@giacomo.ferrari15, order is executed on close of the bar which broke PSAR. By default orders are filled on open of the next bar.
응답
hmmm study based on this gives a repaint warning, any reason for that?
응답
홈으로 스탁 스크리너 포렉스 스크리너 크립토 스크리너 이코노믹 캘린더 사용안내 차트 특징 프라이싱 프렌드 리퍼하기 하우스룰(내부규정) 헬프 센터 웹사이트 & 브로커 솔루션 위젯 차팅 솔루션 라이트웨이트 차팅 라이브러리 블로그 & 뉴스 트위터
프로화일 프로화일설정 계정 및 빌링 리퍼드 프렌즈 코인 나의 서포트 티켓 헬프 센터 공개아이디어 팔로어 팔로잉 비밀메시지 채팅 로그아웃