How can I use SetPlotWidth inside a numeric simple function please?
I cannot figure out the code to set the plot correctly please?
Code: Select all
SetPlotWidth(1, 40);
BottomLive = MINLIST ( MC1H,MC1L) ;
Code: Select all
SetPlotWidth(1, 40);
BottomLive = MINLIST ( MC1H,MC1L) ;
EasyLanguage EssentialsI want to be able to pass my numeric simple function value called BottomLive and ALSO be able to SetPlotWidth to large values like 40? I am trying to shade a rectangle area vertically & horizonatally from a high value MC1H down to a low value MC1L .
How can I use SetPlotWidth inside a numeric simple function please?
I cannot figure out the code to set the plot correctly please?Code: Select all
SetPlotWidth(1, 40);
BottomLive = MINLIST ( MC1H,MC1L) ;
Yes to plot a function with a SetPlotWidth is difficult to understand ...even with the ebook on those pages...but thanks.I have never tried a SetPlotWidth inside a function...
Thx JoshMThere's a wiki article about Passing values to and from a function, in case that might be helpful.
Did you knew that SetPlotWidth only allows for values up to 14? I'm just saying before you think your code is wrong because the width didn't become 40.I want to be able to pass my numeric simple function value called BottomLive and ALSO be able to SetPlotWidth to large values like 40?
I tried this indicator:I want to be able to pass my numeric simple function value called BottomLive and ALSO be able to SetPlotWidth to large values like 40?
Code: Select all
SetPlotWidth(1, 40);
BottomLive = MINLIST ( MC1H,MC1L) ;
Code: Select all
Variables:
bottomLiveValue(0);
Plot1(Close);
bottomLiveValue = Snippet_Function;
Print("bottomLiveValue = ", bottomLiveValue);
Code: Select all
SetPlotWidth(1, 10);
Snippet_Function = MinList(Close, Close[1]);
So it looks like the SetPlotWidth cannot be used in a function. But looking at your goal (shading a rectangular area), wouldn't a couple of trendlines work? Or perhaps a text box, or would that not give the behaviour you're after?------ Compiled with error(s): ------
setplotwidth is not applicable to this type of study
line 0, column 0
Keyword "Plot**" can't been used in this type of study
line 0, column 0
As JoshM has correctly stated above - SetPlotWidth cannot be used in a function. The plot is declared in an indicator. So the function has no idea regarding the plots that you will have or won't have in an indicator, and therefore you cannot set a width for them.Yep...originally was tryin to determine how to use SetPlotWidth in a function...can't. So. Why?