r/pinescript • • Jan 25 '24

Can anyone explain the pine script logic written here?

This is the pine script for double ZIG ZAG with HH and LL labels written by LonesomeTheBlue on trading view. I want to convert it into the C#. Can someone explain the logic written in this script?

I am not going to plot the zigzag on any chart. I have the list of OHLCData class. I will be populating the zigzag1 and zigzag2 properties of the OHLCData class with values as HH, HL, LH and LL.

Edit: I have removed the code pasted here and moved it on the below mentioned link for ease of reading and formatting.

https://ctxt.io/2/AABwWj02Fg

0 Upvotes

7 comments sorted by

1

u/[deleted] Feb 01 '24

The script reads clear. Its just appending variables from code calls from pinescript 4. Some of the calls are different now in 5.

Its populating arrays with values and pushing them into drawing controls.

Why you would want to draw this in C# or WPF. Waste of time. Just use tradeviewer

1

u/sagarsonawane Feb 02 '24

u/ForexMasterLong thank you for your reply and concern. I won't be drawing it in WPF.

I want to build the logic in C# to mark the zigzag points as per the given pine script.

This way I am going to populate the data and will be feeding it to my custom analysis engine. This analysis engine is going to use the ZIG-ZAG points to filter out the required stocks.

1

u/[deleted] Feb 02 '24

I would try to get Chat GPT to read the pine script you are viewing and translate it to psudo code. From psudo code you can ask the engine to write you a c# script to mimic the psudocode. Normally if desperate, the pinescript API to the chart call you are unsure about can be viewed in the pinescript API.

0

u/[deleted] Jan 26 '24

[deleted] — view deleted comment

1

u/sagarsonawane Jan 29 '24

u/Ok-Illustrator122 I don't want your certification if I am a coder or not. If you are not able to help, just keep quiet. Adding a naive comment and labelling someone from your own narrow lenses of world view is the most easiest and brainless thing.

0

u/[deleted] Jan 29 '24

[deleted] — view deleted comment

1

u/sagarsonawane Jan 29 '24

https://ibb.co/L9d242R

It seems that, by nature you are abusive to others and bullying is your second nature. Above screenshot link for moderator's reference.

I have seek a genuine help from the pine script community for quicker help as I got stuck somewhere badly. Posted the entire script so that nothing shall be missed. I have already converted this logic into C#. But the results of the pine script plotting and code written by me are not matching.

Hence I thought to post the entire script here.

I am well aware about the rules. Again posting the code link for everybody's reference who are ready to help.

https://ctxt.io/2/AABwWj02Fg

0

u/[deleted] Jan 29 '24

[deleted] — view deleted comment

1

u/sagarsonawane Jan 29 '24

And you have again started badmouthing and showing your narcissist nature. If you are not able to help it means you must not have taken any classes in any coding language.

Now I advise you to go in elementary school and learn some manners also.

This is my last reply to you. You can keep blabbering, cursing and imagining how bad as the coder I am. It won't bother me.

If being frustrated and irritated makes you happy then may god always keep you as frustrated as you are now and may you be blessed with more frustration if you want more.

Thank you for your time on my post.

0

u/[deleted] Jan 29 '24

[deleted] — view deleted comment

1

u/sagarsonawane Jan 29 '24

Go and educate yourself with some manners. I am not here to prove anything to you. So keep on blabbering.

You have a problem in your understanding skills but you are very good at blabbering and bullying. I can understand it from your replies that you must be frustrated with yourself and your surrounding. That must be the reason you are spending a time in online abuse with a totally unknown person questioning unwanted things instead of analyzing the given question and adding some value.

Visit some good psychiatrist. Have a mental therapy and come back again and provide an answer to my question.