TradingView
blackcat1402
9 יוני 2022 09:13

[blackcat] L1 Python Friendly Lucid SAR 

SSE Composite IndexSSE

תיאור

Level 1

Background

LUCID SAR is an interesting technical indicator. I'm having trouble converting this to Python code. So a "Python friendly" version was rewritten literally. Because some basic functions and structures have been replaced. The performance can be 100% consistent with LUCID SAR.

Function

Mr. Bowman wrote this script after having listened to Hyperwave with Sawcruhteez and Tyler Jenks of Lucid Mr. Bowmannvestments Strategies LLC on July 3, 2019. They felt that the existing built-in Parabolic SAR indicator was not doing its calculations properly, and they hoped that someone might help them correct this. So Mr. Bowman tried his hand at it,adding the rule regarding the SAR not advancing beyond the high (low) of the prior two candles during an uptrend (downtrend), but the core script is as it was.

https://cn.tradingview.com/script/OkACQQgL-Lucid-SAR/


I use large sized cross with red color for downtrend, with green color for uptrend, so that when I overlapped original work from Mr. Bowman, they can be 100% matched, which provided a validation process for this re-writing work. Enjoy!

Remarks

Feedbacks are appreciated.
Python version Lucid SAR performance discussion is desired.
תגובות
Abdullah51122
My dear friend, he asked for an indicator and it was paid and it did not come to me -L4 Banker Fund Flow Trend Oscillator
blackcat1402
@Abdullah51122, done and sorry for the late reply
kurtsmock
cool. You wrote it in v4. nice. And its a function... also nice. Very cool.
I have a SAR script that I made up. It does this very same thing where you can adapt all the inputs to different market conditions. If I find any meaning differences between this and the one I wrote that I think are helpful I'll let you know. But, I think they are the same thing written different ways.
blackcat1402
@kurtsmock, yeah, pine v4 is more similar to python grammar :)
Pratik_4Clover
Thanks!
blackcat1402
@Pratik_4Clover, with pleasure
illi4
I tried implementing this in python and the result does not seem correct.
blackcat1402
@illi4, it is not related to this script, my python version works well.
illi4
@blackcat1402, sorry, could you please share the python version? Mine just gives wrong results
peterchansk
How to convert it to efficent Python code?
I tried but it ran very slowly. Do you have a Python version?
עוד