Hello coders.
I have a request,
I would like someone to post a paint-bar template so I can modify it to test out a theory please, and I would like to base it on price bars as in close > close -1 etc on up and down bars.
And cheeky I know, but another the same so I can add red and green dots underneath and on top up and down bars using price bars( Not paint-bars).
Any help would be gratefully appreciated.
Thank you in advance.
templates
- TJ
- Posts: 7752
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1034 times
- Been thanked: 2228 times
Re: templates
This is too vague... there are so many permutations on what can be done. It is ok to ask people to do something, but you are likely to encounter more questions than answers, and you will be coming back to ask for more examples.Hello coders.
I have a request,
I would like someone to post a paint-bar template so I can modify it to test out a theory please, and I would like to base it on price bars as in close > close -1 etc on up and down bars.
And cheeky I know, but another the same so I can add red and green dots underneath and on top up and down bars using price bars( Not paint-bars).
Any help would be gratefully appreciated.
Thank you in advance.
Have you given your idea a try?
Have you read the manuals?
I would suggest you post your efforts, then we can chime in to help you with debugging.
Re: templates
Hi TJ, and thanks for your reply, here is some code, I do not seem to be able to compile it.
MCFX paintbars
Inputs:
UpColor (red),
DnColor (green),
UnCngColor (yellow);
Variables:
BarColor (0);
If Close > Close[1] and Low > Low[1] and Close < High[1] and Close <= (High+Low)/2 then BarColor = UpColor //red
else
If Close[1] > Open[1] and Close < High[1] and Close > Close[1]then BarColor = UpColor //red
else
If Close > Open and Close <= (High+Low)/2 and Close[1] > Close[1] then BarColor = UpColor //red
else
If Close[1] < Open[1] AND Close > Close[1] AND Close < High[1] AND Low > Low[1]then BarColor = UpColor //red
else
If Close[1] > Open[1] AND High > High[1] AND High > High[2]AND Close < High[1] AND Close > Low[1]and Close < (High+Low)/2 then BarColor = UpColor //Red Hidden Upthrust
else
If Close < Close[1] and High < High[1] AND Close > Low[1]and Close >= (High+Low)/2 then BarColor = DnColor //green
else
If Close[1] < Open[1] and Close > low[1] and Close < Close[1]and High < High[1]then BarColor = DnColor //green
else
If Close < open and Close >= (High+Low)/2 then BarColor = DnColor //green
else
If Close[1] > Open[1] AND Close < Close[1] AND Close > Low[1]AND High < High[1] then BarColor = DnColor //green test inside bar
else
If Close[1] < Open[1] AND Low < Low[1] AND Close > Close[1] AND Close < High[1] AND Close <(H+L)/2 then BarColor = DnColor //Hidden Spring
else
BarColor = UnCngColor;
Plot1(High, "High", BarColor);
Plot2(Low, "Low", BarColor);
Plot3(Close, "Close", BarColor);
1Red: Close > Close[1] Low > Low[1] Close < High[1] and Close <= (High+Low)/2 //Up bar close middle
2Red: Close[1] > Open[1] and Close < High[1] and Close > Close[1] Stalling upside
3Red: Close > Open and Close <= (High+Low)/2 up bar close < midpoint
4Red: Close[1] < Open[1] AND Close > Close[1] AND Close < High[1] AND Low > Low[1] //down bar then 'no demand'
1Green: Close < Close[1] and High < High[1] AND Close > Low[1]and Close >= (High+Low)/2 //Down bar close middle
2Green: Close[1] < Open[1] and Close > low[1] and Close < Close[1]and High < High[1] and //Stalling downside
3Green: Close < open and Close >= (High+Low)/2
4Green: Close[1] > Open[1] AND Close < Close[1] AND Close > Low[1] AND High < High[1] // prev bar up, then test
---------------------------------------------------------
Close < Close[1]and High > High[1] //red
Close > Close[1]and Low < Low[1] //green
MCFX paintbars
Inputs:
UpColor (red),
DnColor (green),
UnCngColor (yellow);
Variables:
BarColor (0);
If Close > Close[1] and Low > Low[1] and Close < High[1] and Close <= (High+Low)/2 then BarColor = UpColor //red
else
If Close[1] > Open[1] and Close < High[1] and Close > Close[1]then BarColor = UpColor //red
else
If Close > Open and Close <= (High+Low)/2 and Close[1] > Close[1] then BarColor = UpColor //red
else
If Close[1] < Open[1] AND Close > Close[1] AND Close < High[1] AND Low > Low[1]then BarColor = UpColor //red
else
If Close[1] > Open[1] AND High > High[1] AND High > High[2]AND Close < High[1] AND Close > Low[1]and Close < (High+Low)/2 then BarColor = UpColor //Red Hidden Upthrust
else
If Close < Close[1] and High < High[1] AND Close > Low[1]and Close >= (High+Low)/2 then BarColor = DnColor //green
else
If Close[1] < Open[1] and Close > low[1] and Close < Close[1]and High < High[1]then BarColor = DnColor //green
else
If Close < open and Close >= (High+Low)/2 then BarColor = DnColor //green
else
If Close[1] > Open[1] AND Close < Close[1] AND Close > Low[1]AND High < High[1] then BarColor = DnColor //green test inside bar
else
If Close[1] < Open[1] AND Low < Low[1] AND Close > Close[1] AND Close < High[1] AND Close <(H+L)/2 then BarColor = DnColor //Hidden Spring
else
BarColor = UnCngColor;
Plot1(High, "High", BarColor);
Plot2(Low, "Low", BarColor);
Plot3(Close, "Close", BarColor);
1Red: Close > Close[1] Low > Low[1] Close < High[1] and Close <= (High+Low)/2 //Up bar close middle
2Red: Close[1] > Open[1] and Close < High[1] and Close > Close[1] Stalling upside
3Red: Close > Open and Close <= (High+Low)/2 up bar close < midpoint
4Red: Close[1] < Open[1] AND Close > Close[1] AND Close < High[1] AND Low > Low[1] //down bar then 'no demand'
1Green: Close < Close[1] and High < High[1] AND Close > Low[1]and Close >= (High+Low)/2 //Down bar close middle
2Green: Close[1] < Open[1] and Close > low[1] and Close < Close[1]and High < High[1] and //Stalling downside
3Green: Close < open and Close >= (High+Low)/2
4Green: Close[1] > Open[1] AND Close < Close[1] AND Close > Low[1] AND High < High[1] // prev bar up, then test
---------------------------------------------------------
Close < Close[1]and High > High[1] //red
Close > Close[1]and Low < Low[1] //green
- Attachments
-
- TS Chart.jpg
- (218.42 KiB) Downloaded 1296 times
- TJ
- Posts: 7752
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1034 times
- Been thanked: 2228 times
Re: templates
I have compiled the code with no problem.Hi TJ, and thanks for your reply, here is some code, I do not seem to be able to compile it.
...
You must have included the non-codes into the indicator.
Please copy and paste (or screenshot) the error message here.
We cannot help you without the error message.
Where did you get the code?
please see How to post codes
viewtopic.php?f=16&t=11713
- TJ
- Posts: 7752
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1034 times
- Been thanked: 2228 times
Re: templates
here's the code you should be compiling, nothing more.
Code: Select all
Inputs:
UpColor (red),
DnColor (green),
UnCngColor (yellow);
Variables:
BarColor (0);
If Close > Close[1] and Low > Low[1] and Close < High[1] and Close <= (High+Low)/2
then BarColor = UpColor //red
else
If Close[1] > Open[1] and Close < High[1] and Close > Close[1]
then BarColor = UpColor //red
else
If Close > Open and Close <= (High+Low)/2 and Close[1] > Close[1]
then BarColor = UpColor //red
else
If Close[1] < Open[1] AND Close > Close[1] AND Close < High[1] AND Low > Low[1]
then BarColor = UpColor //red
else
If Close[1] > Open[1] AND High > High[1] AND High > High[2]AND Close < High[1] AND Close > Low[1]and Close < (High+Low)/2
then BarColor = UpColor //Red Hidden Upthrust
else
If Close < Close[1] and High < High[1] AND Close > Low[1]and Close >= (High+Low)/2
then BarColor = DnColor //green
else
If Close[1] < Open[1] and Close > low[1] and Close < Close[1]and High < High[1]
then BarColor = DnColor //green
else
If Close < open and Close >= (High+Low)/2 then BarColor = DnColor //green
else
If Close[1] > Open[1] AND Close < Close[1] AND Close > Low[1]AND High < High[1]
then BarColor = DnColor //green test inside bar
else
If Close[1] < Open[1] AND Low < Low[1] AND Close > Close[1] AND Close < High[1] AND Close <(H+L)/2
then BarColor = DnColor //Hidden Spring
else
BarColor = UnCngColor;
Plot1(High, "High", BarColor);
Plot2(Low, "Low", BarColor);
Plot3(Close, "Close", BarColor);
Re: templates
Hi TJ,
I have narrowed it down to this code:
Inputs:
UpColor (red),
DnColor (green),
UnCngColor (yellow);
Variables:
BarColor (0);
If High < High[1] and Low < Low[1]
then BarColor = UpColor //red
else
If High > High[1] and Low > Low[1]
then BarColor = DnColor //green
else
BarColor = UnCngColor;
Plot1(High, "High", BarColor);
Plot2(Low, "Low", BarColor);
Plot3(Close, "Close", BarColor);
Plot4(Open, "Open", BarColor);
The error code I get when trrying to compile it is this:
Study: "Seb 2" (Indicator)
Please wait ....
------ Compiled with error(s): ------
Compile error
errLine 0, errColumn 0, errLineEnd 0, errColumnEnd 0
causal study: (Function)
Thank you in advance
I have narrowed it down to this code:
Inputs:
UpColor (red),
DnColor (green),
UnCngColor (yellow);
Variables:
BarColor (0);
If High < High[1] and Low < Low[1]
then BarColor = UpColor //red
else
If High > High[1] and Low > Low[1]
then BarColor = DnColor //green
else
BarColor = UnCngColor;
Plot1(High, "High", BarColor);
Plot2(Low, "Low", BarColor);
Plot3(Close, "Close", BarColor);
Plot4(Open, "Open", BarColor);
The error code I get when trrying to compile it is this:
Study: "Seb 2" (Indicator)
Please wait ....
------ Compiled with error(s): ------
Compile error
errLine 0, errColumn 0, errLineEnd 0, errColumnEnd 0
causal study: (Function)
Thank you in advance
Re: templates
Can't remember, got it from a forum, maybe this one a few years back.I have compiled the code with no problem.Hi TJ, and thanks for your reply, here is some code, I do not seem to be able to compile it.
...
You must have included the non-codes into the indicator.
Please copy and paste (or screenshot) the error message here.
We cannot help you without the error message.
Where did you get the code?
please see How to post codes
viewtopic.php?f=16&t=11713
Regards S
- TJ
- Posts: 7752
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1034 times
- Been thanked: 2228 times
Re: templates
Hi TJ,
I have narrowed it down to this code:
Inputs:
UpColor (red),
DnColor (green),
UnCngColor (yellow);
Variables:
BarColor (0);
If High < High[1] and Low < Low[1]
then BarColor = UpColor //red
else
If High > High[1] and Low > Low[1]
then BarColor = DnColor //green
else
BarColor = UnCngColor;
Plot1(High, "High", BarColor);
Plot2(Low, "Low", BarColor);
Plot3(Close, "Close", BarColor);
Plot4(Open, "Open", BarColor);
The error code I get when trrying to compile it is this:
Study: "Seb 2" (Indicator)
Please wait ....
------ Compiled with error(s): ------
Compile error
errLine 0, errColumn 0, errLineEnd 0, errColumnEnd 0
causal study: (Function)
Thank you in advance
please see How to post codes
viewtopic.php?f=16&t=11713
- TJ
- Posts: 7752
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1034 times
- Been thanked: 2228 times
Re: templates
Please follow this guideHi TJ,
I have narrowed it down to this code:
...
The error code I get when trrying to compile it is this:
Study: "Seb 2" (Indicator)
Please wait ....
------ Compiled with error(s): ------
Compile error
errLine 0, errColumn 0, errLineEnd 0, errColumnEnd 0
causal study: (Function)
Thank you in advance
https://www.multicharts.com/trading-sof ... mnEnd_0%29