Every Fractal indicator minor bug fix
Forums › ProRealTime English forum › ProBuilder support › Every Fractal indicator minor bug fix
- This topic has 27 replies, 6 voices, and was last updated 4 years ago by parthapersonal.
-
-
04/04/2020 at 12:59 PM #12460605/28/2020 at 6:34 AM #133537
Hello Vonasi,
Great work, however with IG Markets PRT (v10.3-1.8.0_45) it is not sensing the “$” and giving error as enslosed.
Is there a possibility to fix this?
Many thanks in advance.
05/28/2020 at 7:49 AM #13354705/29/2020 at 3:51 AM #133695Thank you Vonasi.
12/14/2020 at 11:50 PM #153775@Vonasi Hi thanks for this indicator. Im still working on understanding arrays and how to use them. I was wondering if you could walk me thorugh the code step by step with a little guide?
Ive been reading up on Nicolas’ guide as well trying to code small projects by myself.
For example im trying to count the number of new highs/low set by your indicator.
12/15/2020 at 8:58 AM #153797I coded this a while back so I’d have to remind myself of exactly what I coded and why!
Arrays really are not complicated, especially one dimension arrays such as are available in ProRealCode. Just think of them as a street address and on that street are lots of houses and each house has a number to identify it. If you want to find out what is inside house no.6 on The High Street then you look in $TheHighStreet[6]
Another analogy is to think of each array address as a big box and inside that box can be an endless number of smaller boxes. So if you want to put something in box number 82 then you would put it in $BigBox[82]
Because we can put everything in one big box it means that within our code we can easily sort through what is in the smaller boxes by using $BigBox[x] rather than having to look in SmallBox1 and then in SmallBox2 and then in SmallBox3 etc.
Hopefully soon we can get multi-dimensional arrays – these just have smaller boxes inside the smaller boxes and then even the possibility of smaller boxes inside those smaller boxes!
1 user thanked author for this post.
12/15/2020 at 9:41 AM #153802I made some notes within the code…. hope this helps a little.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103//Every Fractal v1.4//PRT v11//By Vonasi//Date: 20200331//Settings//Qty = 1//StartBack = 0//Past = 1//Future = 1//Points = 1//Fade = 0//BarsBefore = 1//BarsAfter = 1//Make sure all settings are valid onesBarsBefore = max(BarsBefore,1)BarsAfter = max(BarsAfter,1)StartBack = max(0,startback)//Make sure we have enough barsif barindex >= barsbefore + barsafter then//Look for a low fractalBarLookBack = BarsAfter + 1if low[BarsAfter] < lowest[BarsBefore](low)[BarLookBack] THENif low[BarsAfter] = lowest[BarLookBack](low) THEN//Set low fractal array locationa = a + 1//Store bar number and low value in two arrays at location a$supportbar[a] = barindex[barsafter]$supportvalue[a] = low[barsafter]endifendif//Look for a high fractalif high[BarsAfter] > highest[BarsBefore](high)[BarLookBack] THENif high[BarsAfter] = highest[BarLookBack](high) THEN//Set high fractal array locationb = b + 1//Store bar number and high value in two arrays at location b$resistancebar[b] = barindex[barsafter]$resistancevalue[b] = high[barsafter]endifendifif islastbarupdate thenmyqty = min(min(b,a),qty)//Loop to draw correct number of linesfor z = 0 to myqty-1e = (myqty)-z//Calculate colour contrast setting based on number of lines being drawnif fade thenc = (255/myqty)*eelsec = 255endif//If drawing support linesif support then//Check that we have at least two low points storedif a >= 2 thenif future thendrawray($supportbar[a-z-1-startback],$supportvalue[a-z-1-startback],$supportbar[a-z-startback],$supportvalue[a-z-startback])coloured(128,0,0,c)endifif past thendrawray($supportbar[a-z-startback],$supportvalue[a-z-startback],$supportbar[a-z-1-startback],$supportvalue[a-z-1-startback])coloured(128,0,0,c)endifif points thendrawpoint($supportbar[a-z-1-startback],$supportvalue[a-z-1-startback],2)coloured(128,0,0,c)drawpoint($supportbar[a-z-startback],$supportvalue[a-z-startback],2)coloured(128,0,0,c)endifendifendif//If drawing resistance linesif resistance then//Check that we have at least two high points storedif b >= 2 thenif future thendrawray($resistancebar[b-z-1-startback],$resistancevalue[b-z-1-startback],$resistancebar[b-z-startback],$resistancevalue[b-z-startback])coloured(0,128,0,c)endifif past thendrawray($resistancebar[b-z-startback],$resistancevalue[b-z-startback],$resistancebar[b-z-1-startback],$resistancevalue[b-z-1-startback])coloured(0,128,0,c)endifif points thendrawpoint($resistancebar[b-z-1-startback],$resistancevalue[b-z-1-startback],2)coloured(0,128,0,c)drawpoint($resistancebar[b-z-startback],$resistancevalue[b-z-startback],2)coloured(0,128,0,c)endifendifendifnextendifendifreturn1 user thanked author for this post.
12/16/2020 at 12:34 PM #153948Great Job Vonasi. However upon execution it is throwing the error message as, “The following variable is undefined: resistance, support.
What should be there initial values please?
12/16/2020 at 12:41 PM #153950I have set their initial values as 1. Is it correct?
12/16/2020 at 1:47 PM #153976You need to remove the // on lines 7 to 14.
Lines 9 to 12 are just boolean switches to turn on and off options so should be set to 0 or 1.
It is best if you download the original indicator from the library and then replace the code in it with the corrected code from this topic as that way all the indicator functionality is already set up with indicator options to change settings in the indicator window.
12/17/2020 at 5:15 AM #154067Many thanks dear Vonasi. Much appreciated. Any luck with my request as below:
Hello Vonasi, Great news. I got the version 11 today and now only. Hence I am requesting you to please help me to automatically draw only 2 trend lines in the chart- one up trend line joining the last 2 swing lows (2nd swing low must be higher than 1st swing low) and one down trend line joining the last 2 swing highs (2nd swing high must be lower than 1st swing high). the line should be extended to the right only. If possible, I need to put alarm when price closes above or below this dynamic line.
Can you help me on this please.
Regards,
12/18/2020 at 10:27 AM #154246parthapersonal – Please follow the forum rules and do not double post. You have asked the exact same question in another topic and I have answered the question there and provided two possible indicators that might meet your needs. Double posting just leads to confusion and wasted time. Ask your question in one place and one place only.
12/18/2020 at 1:05 PM #154274Sorry mate, it was a mistake. Regret.
-
AuthorPosts
Find exclusive trading pro-tools on