In TS, you can offset setplotcolor as in:
setplotcolor[1](1,red)
The offset doesn't seem to have any effect with MC,
Offsetting SetPlotColor
- TJ
- Posts: 7775
- Joined: Aug 29 2006
- Location: Global Citizen
- Has thanked: 1036 times
- Been thanked: 2233 times
mine works ok.
bear in mind that the plot color timing appear differently when plot as histogram than a line.
Try it out with both of these 2 plot types and see.
bear in mind that the plot color timing appear differently when plot as histogram than a line.
Try it out with both of these 2 plot types and see.
No problem here with lines or histograms.
When setting the colour of the current bar there's a subtle difference between histograms and lines. With a histogram, the current bar is coloured with your new colour. With a line, it's the segment from the current bar to next that takes the new colour. ie. you don't see it until the current bar is over.
I don't know if that's any different to the way TS works. I've never used it, only MC.
When setting the colour of the current bar there's a subtle difference between histograms and lines. With a histogram, the current bar is coloured with your new colour. With a line, it's the segment from the current bar to next that takes the new colour. ie. you don't see it until the current bar is over.
I don't know if that's any different to the way TS works. I've never used it, only MC.
sparkz,
You've described the behavior the the offsetting should change. This only applies to lines, not histo's, dots etc.
The goal is to change the line color of the segment between the prior bar and the current bar based on what the current bar does intrabar.
I'll post pics of the difference between MC and TS a little later today.
You've described the behavior the the offsetting should change. This only applies to lines, not histo's, dots etc.
The goal is to change the line color of the segment between the prior bar and the current bar based on what the current bar does intrabar.
I'll post pics of the difference between MC and TS a little later today.
Here's a pic showing the difference. Its a standard price channel modified to show when the bands push up or down.
- Attachments
-
- MC TS Price Chan Dif.JPG
- (135.91 KiB) Downloaded 925 times
Sorry Doug, that's what I meant.
I didn't know about TS doing it differently to MC. It certainly seems more logical.
I tend to write my indicators specifically for a line or histogram, so set the colour 1 bar back or on the current bar as required.
Of course if you want to the change the line type you have to edit the code which isn't going to be great if you haven't got it!
I didn't know about TS doing it differently to MC. It certainly seems more logical.
I tend to write my indicators specifically for a line or histogram, so set the colour 1 bar back or on the current bar as required.
Of course if you want to the change the line type you have to edit the code which isn't going to be great if you haven't got it!
- Attachments
-
- 2008-05-14_165254.jpg
- (97.97 KiB) Downloaded 916 times
hey sparkz,
As i re-read my post above, sounded a little brusque...sorry, was suffering a bit with a gold position.
Looks like you've solved it with your plots. I'll mess with it some, it's my code.
Still, it seems like something the good people at MC might want to look at if their goal is maximum EL compatibility.
cheers
As i re-read my post above, sounded a little brusque...sorry, was suffering a bit with a gold position.
Looks like you've solved it with your plots. I'll mess with it some, it's my code.
Still, it seems like something the good people at MC might want to look at if their goal is maximum EL compatibility.
cheers
This works exactly like this in TS. Look at the freely available code for the Hull Moving Average for TS and you will see one of the parameters is to change the color one bar back due to how coloring lines works.hey sparkz,
As i re-read my post above, sounded a little brusque...sorry, was suffering a bit with a gold position.
Looks like you've solved it with your plots. I'll mess with it some, it's my code.
Still, it seems like something the good people at MC might want to look at if their goal is maximum EL compatibility.
cheers
- Fanus
- TJ
- Posts: 7775
- Joined: Aug 29 2006
- Location: Global Citizen
- Has thanked: 1036 times
- Been thanked: 2233 times
are you using the same code to make these 2 graphs?Here's a pic showing the difference. Its a standard price channel modified to show when the bands push up or down.
or are you using the "same" indicator only?
p.s. I notice you use !_ as indicator prefix. I do the same to keep my list on the top.
OK made it work.
MC support : below is some very simple code that shows a case where code works differently in MC 3.0 and TS 8.3.
MC support : below is some very simple code that shows a case where code works differently in MC 3.0 and TS 8.3.
Code: Select all
Input:PClen(5);
vars:pcup(0),pclo(0);
vars:UpColor(yellow);
pcup = HighestFC(H,PClen);
plot1(pcup);
// This code works properly in both TS and MC
if pcup[1] < pcup[0] then SetPlotColor[1](1,green)
else if pcup[1] > pcup[0] then SetPlotColor[1](1,red)
else SetPlotColor[1](1,black);
{
// This code works properly only in TS
if pcup[1] < pcup[0] then UpColor = green
else if pcup[1] > pcup[0] then UpColor = red
else UpColor = black;
SetPlotColor[1](1,UpColor);
}
- Marina Pashkova
- Posts: 2758
- Joined: Jul 27 2007
Hi guys,OK made it work.
MC support : below is some very simple code that shows a case where code works differently in MC 3.0 and TS 8.3.Code: Select all
Input:PClen(5);
vars:pcup(0),pclo(0);
vars:UpColor(yellow);
pcup = HighestFC(H,PClen);
plot1(pcup);
// This code works properly in both TS and MC
if pcup[1] < pcup[0] then SetPlotColor[1](1,green)
else if pcup[1] > pcup[0] then SetPlotColor[1](1,red)
else SetPlotColor[1](1,black);
{
// This code works properly only in TS
if pcup[1] < pcup[0] then UpColor = green
else if pcup[1] > pcup[0] then UpColor = red
else UpColor = black;
SetPlotColor[1](1,UpColor);
}
The code really works differently in MC and TS. This is an MC bug. Our engineers will be working to fix it.
Thanks for reporting!
- TJ
- Posts: 7775
- Joined: Aug 29 2006
- Location: Global Citizen
- Has thanked: 1036 times
- Been thanked: 2233 times
oh shocks... I have to rewrite all my codesHi guys,
The code really works differently in MC and TS. This is an MC bug. Our engineers will be working to fix it.
Thanks for reporting!