renko chart ma cross not matching up  [SOLVED]

Questions about MultiCharts and user contributed studies.
User avatar
BB123
Posts: 68
Joined: 24 Nov 2023
Has thanked: 22 times
Been thanked: 10 times

renko chart ma cross not matching up

Postby BB123 » 02 Dec 2023

Hi all... So i coded up a line cross signal script... I placed it on the renko chart and my lines dont match up with the MA lines.. Anyone have any reason why?


Code: Select all

inputs: Price( Close ), FastLength( 9 ), SlowLength( 18 ), style(1); // ( 1 = solid, 2 = dashed, 3 = dotted ... etc etc ) variables: var0( 0 ), var1( 0 ) , drawlineGreen(true), drawlineRed(true), tl(-1); var0 = AverageFC( Price, FastLength ) ; var1 = AverageFC( Price, SlowLength ) ; if var0 > var1 and drawlineGreen = true then begin tl = tl_new(date,time[0], l, date, time[0], h); tl_setcolor(tl, green); // set trendline color from input tl_setstyle(tl, style); // set trendline style from input tl_setextleft(tl, true); // set trendline extension to left true (for HIGH) tl_setextright(tl, true); // set trendline extension to right true (for LOW) drawlineGreen = false; drawlineRed = true; end else if var0 < var1 and drawlineRed = true then begin tl = tl_new(date,time[0], l, date, time[0], h); tl_setcolor(tl, red); // set trendline color from input tl_setstyle(tl, style); // set trendline style from input tl_setextleft(tl, true); // set trendline extension to left true (for HIGH) tl_setextright(tl, true); // set trendline extension to right true (for LOW) drawlineGreen = true; drawlineRed = false; end
Attachments
renko wrong lines.JPG
(62.48 KiB) Not downloaded yet

User avatar
TJ
Posts: 7743
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: renko chart ma cross not matching up

Postby TJ » 04 Dec 2023

You have a non-time-based chart.
You have to use the keywords with the "_s" suffix.

eg.
TL_new_s
TL_SetBegin_s
TL_SetEnd_s

https://www.multicharts.com/trading-sof ... ne_Drawing

User avatar
BB123
Posts: 68
Joined: 24 Nov 2023
Has thanked: 22 times
Been thanked: 10 times

Re: renko chart ma cross not matching up  [SOLVED]

Postby BB123 » 11 Dec 2023

Hi TJ... Thanks for pointing me in the right direction.... Makes sense.. adding resolutions down to seconds vs just minutes... (seems so obvious once its in front of you)...


Return to “MultiCharts”