Draw the middle level on the ZigZag indicator

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

Draw the middle level on the ZigZag indicator

Postby Ephedan » Wed Jun 15, 2022 2:56 am

Hello.

I am contacting you because I am having difficulty drawing the midian between the ZigZag high and the ZigZag low.

To date, the median is plotted on the ZigZag low candlestick. The Zigzag high is not taken into account.
I plotted on the graph what I would like.

Do you have any idea what's wrong?

Thanks for your advices.

Have a good day
Best regards,
Attachments
MTD_ZigZag_levels_15062022.lua
Indicator
(3.56 KiB) Downloaded 52 times
Capture d’écran 2022-06-15 094216.png
Middle ZigZag draw
Capture d’écran 2022-06-15 094256.png
Middle ZigZag wish
Ephedan
 
Posts: 15
Joined: Thu Jul 15, 2021 10:18 am

Re: Draw the middle level on the ZigZag indicator

Postby Apprentice » Wed Jun 15, 2022 1:34 pm

We have added your request to the development list.
Development reference 350.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Draw the middle level on the ZigZag indicator

Postby Apprentice » Wed Jun 22, 2022 6:20 am

Compliments on proficient coding.

Try this version.
https://fxcodebase.com/code/viewtopic.php?f=17&t=72417

Would you be interested to work on some of the forum tasks we have?
If yes, please send me email at mario(.)jemic(@)gmail(.)com
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Draw the middle level on the ZigZag indicator

Postby Ephedan » Mon Jun 27, 2022 2:24 am

Hello.

Thank you for your feedback and for your work.

Thank you also for your compliments. This pleases me.

Regarding your proposal, I must study how I could integrate your proposal into my professional schedule.

I am also coming back to you, because I cannot resolve the difference between the calculated value and the real value of 50%.
I am attaching a screen shot of the discrepancy noted and the date on which it occurs.

Once again, thank you for your help, it is very valuable.

Best regards;
Attachments
Capture d’écran 2022-06-27 092318.png
Ephedan
 
Posts: 15
Joined: Thu Jul 15, 2021 10:18 am


Re: Draw the middle level on the ZigZag indicator

Postby Ephedan » Mon Jun 27, 2022 3:14 am

Did you post the fix at https://fxcodebase.com/code/viewtopic.php?f=17&t=72417 ?
I do not see it.
Ephedan
 
Posts: 15
Joined: Thu Jul 15, 2021 10:18 am

Re: Draw the middle level on the ZigZag indicator

Postby Apprentice » Mon Jun 27, 2022 4:47 am

Try to use a different browser.
You have an old file in your browser buffer.

Or use this version.
ZigZag Median.lua
(6.15 KiB) Downloaded 53 times
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Draw the middle level on the ZigZag indicator

Postby Ephedan » Fri Dec 16, 2022 5:32 am

Hello.

I changed my indicator, and I have a problem on line 155 (and by extension on line 169). I have the error "attempt to compare number with nil".

I can’t figure out why.

I wish that Fibonacci lines only appear when the price is above the high Zigzag & that they only appear when the price is below the ZigZag low.

Do you have any idea of the cause and remedy of my problem?

Thank you for your help and insight.

Best regards,
Attachments
MTD_ZigZag_levels.lua
(5.23 KiB) Downloaded 36 times
Ephedan
 
Posts: 15
Joined: Thu Jul 15, 2021 10:18 am

Re: Draw the middle level on the ZigZag indicator

Postby Apprentice » Fri Dec 16, 2022 12:02 pm

Your code
if source[period] > high then
Should be
if source.close[period] > high then
also, make sure you initialize the high

what is your idea for this indicator?
Maybe I can write this your you?

Contact us if you are interested in SDK coding lessons.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Draw the middle level on the ZigZag indicator

Postby Ephedan » Fri Dec 16, 2022 2:08 pm

Hi Apprentice.

- Yes, it’s a mistake. The correct code is
Code: Select all
source.close[period] > high

- My idea is if the price is higher than the red red line, the Fibonacci lines appearing. If the price is lower than the green lin, the Fibonacci lines appearing. If the price is between the red and the green lines, the Fibonacci lines are hidden.
- I want you to make me a proposal to solve my problem
- I would be interested in SDK courses. How much does it cost?

Thank you for your help.

Best regards,
Ephedan
 
Posts: 15
Joined: Thu Jul 15, 2021 10:18 am

Next

Return to Indicator and Signal Requests

Who is online

Users browsing this forum: No registered users and 16 guests