[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Re: Playing with Colors



PureBytes Links

Trading Reference Links


Bill,
 
Thanks for the code.  I just added a label for the line to see how the text looks in the y-axis.  I hope you'll post this to the AmiBroker library as it's powerfully handy.
 
Ya see, you post code, and good things happen.  That's the great thing about this board.  We may have our differences, but at the end of the day we always kiss and make up.
 
Happy Holidays,
GaryBill Barnard <wbarnard@xxxxxxx> wrote:
Gary,Thanks for sharing your "color explorer". I have made a variation of it which works well in a small pane (1/10 to 1/6 of full window height). It automatically shows all the color choices (as wide as possible) in the ribbon no matter the number of bars displayed and displays the full color name for coding help. The Bars per Color is displayed to make it easy to zoom in to one bar per color so that you can efficiently arrow right or left throught the color choices.Bill//===============================================     /*  Color Display */numbars = LastValue(Cum(Status("barvisible")));X = IIf(numbars >= 56, floor(numbars / 56), 1);Plot( 20, "", int(Cum(1/X)%56 ), styleOwnScale |styleArea | styleNoLabel,0,100);Plot(28*X*sin(Cum(0.112/X)),"",
 SelectedValue(int(Cum(1/X)%56)),styleOwnScale | styleLine | styleNoLabel,-X*50, X*40);Plot(Cum(1)%(56*X) - 28*X,"num",SelectedValue(int(Cum(1/X)%56)),styleOwnScale | styleHistogram |styleNoLabel,      -X*50, X*40);n = SelectedValue(int(Cum(1/X)%56));colorstring =      WriteIf(n ==0,   "colorCustom1 - number 0",      WriteIf(n ==1,   "colorCustom2 - number 1",      WriteIf(n ==2,   "colorCustom3 - number 2",      WriteIf(n ==3,   "colorCustom4 - number 3",      WriteIf(n ==4,   "colorCustom5 - number 4",      WriteIf(n ==5,   "colorCustom6 - number 5",      WriteIf(n ==6,   "colorCustom7 - number 6",      WriteIf(n ==7,  
 "colorCustom8 - number 7",      WriteIf(n ==8,   "colorCustom9 - number 8",      WriteIf(n ==9,   "colorCustom10 - number 9",      WriteIf(n ==10, "colorCustom11 - number 10",      WriteIf(n ==11, "colorCustom12 - number 11",      WriteIf(n ==12, "colorCustom13 - number 12",      WriteIf(n ==13, "colorCustom14 - number 13",      WriteIf(n ==14, "colorCustom15 - number 14",      WriteIf(n ==15, "colorCustom16 - number 15",      WriteIf(n ==16, "colorBlack - number 16",      WriteIf(n ==17, "colorBrown - number 17",      WriteIf(n ==18, "colorDarkOliveGreen - number 18",      WriteIf(n ==19, "colorDarkGreen - number
 19",      WriteIf(n ==20, "colorDarkTeal - number 20",      WriteIf(n ==21, "colorDarkBlue - number 21",      WriteIf(n ==22, "colorIndigo - number 22",      WriteIf(n ==23, "colorDarkGrey - number 23",      WriteIf(n ==24, "colorDarkRed - number 24",      WriteIf(n ==25, "colorOrange - number 25",      WriteIf(n ==26, "colorDarkYellow - number 26",      WriteIf(n ==27, "colorGreen - number 27",      WriteIf(n ==28, "colorTeal - number 28",      WriteIf(n ==29, "colorBlue - number 29",      WriteIf(n ==30, "colorBlueGrey - number 30",      WriteIf(n ==31, "colorGrey40 - number 31",      WriteIf(n ==32, "colorRed
 - number 32",      WriteIf(n ==33, "colorLightOrange - number 33",      WriteIf(n ==34, "colorLime - number 34",      WriteIf(n ==35, "colorSeaGreen - number 35",      WriteIf(n ==36, "colorAqua - number 36",      WriteIf(n ==37, "colorLightBlue - number 37",      WriteIf(n ==38, "colorViolet - number 38",      WriteIf(n ==39, "colorGrey50 - number 39",      WriteIf(n ==40, "colorPink - number 40",      WriteIf(n ==41, "colorGold - number 41",      WriteIf(n ==42, "colorYellow - number 42",      WriteIf(n ==43, "colorBrightGreen - number 43",      WriteIf(n ==44, "colorTurquoise - number 44",      WriteIf(n ==45,
 "colorSkyblue - number 45",      WriteIf(n ==46, "colorPlum - number 46",      WriteIf(n ==47, "colorLightGrey - number 47",      WriteIf(n ==48, "colorRose - number 48",      WriteIf(n ==49, "colorTan - number 49",      WriteIf(n ==50, "colorLightYellow - number 50",      WriteIf(n ==51, "colorPaleGreen - number 51",      WriteIf(n ==52, "colorPaleTurquoise - number 52",      WriteIf(n ==53, "colorPaleBlue - number 53",      WriteIf(n ==54, "colorLavender - number 54",      WriteIf(n ==55, "colorWhite - number 55",      ""))))))))))))))))))))))))))))))))))))))))))))))))))))))));Title = EncodeColor(n)+"Bars per Color =
 "+X+"                  The current selection is  "+ColorString;//==================================================================> Hi all,>  > Below is an expansion of William Peters' useful color.afl which now shows you what lines and histograms look like with your background.  Just click on a color from the band at the bottom, and you'll get a histogram and line of the same.  Hope this helps somebody.>  > Kind Regards,> Gary>  > > //PARAMETERS> > X = Param("Band Width",6,1,10,1);> > Plot( 20, "", int(Cum(1/X)%56 ), styleOwnScale+styleArea+styleNoLabel,0,100);> > Plot(80,"", SelectedValue(int(Cum(1/X)%56)),styleOwnScale+styleLine+styleThick,0,100);> >
 Plot(Cum(1)%70,"",SelectedValue(int(Cum(1/X)%56)),styleOwnScale+styleHistogram+styleThick,0,100);> > Title = "\n"> > + EncodeColor(0) + "0C1"> > + EncodeColor(1) + "1C2 "> > + EncodeColor(2) + "2C3 "> > + EncodeColor(3) + "3C4 "> > + EncodeColor(4) + "4C5 "> > + EncodeColor(5) + "5C6 "> > + EncodeColor(6) + "6C7 "> > + EncodeColor(7) + "7C8 "> > + EncodeColor(8) + "8C9 "> > + EncodeColor(9) + "9C10 "> > + EncodeColor(10) + "10C11 "> > + EncodeColor(11) + "11C12 "> > + EncodeColor(12) + "12C13 "> > + EncodeColor(13) + "13C14 "> > + EncodeColor(14) + "14C15 "> > + EncodeColor(15) + "15C16 "> > + "\n"> > + EncodeColor(16) + "16Blk "> > + EncodeColor(17) + "17Brn "> > + EncodeColor(18) +
 "18DOlvGn "> > + EncodeColor(19) + "19DGn "> > + EncodeColor(20) + "20DTeal "> > + EncodeColor(21) + "21DBlu "> > + EncodeColor(22) + "22Ind "> > + EncodeColor(23) + "23DGy "> > + EncodeColor(24) + "24DRd "> > + EncodeColor(25) + "25Orn "> > + EncodeColor(26) + "26DYel "> > + EncodeColor(27) + "27Gn "> > + EncodeColor(28) + "28Teal "> > + "\n"> > + EncodeColor(29) + "29Blu "> > + EncodeColor(30) + "30BluGy "> > + EncodeColor(31) + "31Gy40 "> > + EncodeColor(32) + "32Rd "> > + EncodeColor(33) + "33LOrn "> > + EncodeColor(34) + "34Lim "> > + EncodeColor(35) + "35SeaGn "> > + EncodeColor(36) + "36Aq "> > + EncodeColor(37) + "37LBlu "> > + EncodeColor(38) + "38Vio "> > +
 EncodeColor(39) + "39Gy50 "> > + EncodeColor(40) + "40Pnk "> > + EncodeColor(41) + "41Gld "> > + EncodeColor(42) + "42Yel "> > +"\n"> > + EncodeColor(43) + "43BGn "> > + EncodeColor(44) + "44Trq "> > + EncodeColor(45) + "45SkyBlu "> > + EncodeColor(46) + "46Plm "> > + EncodeColor(47) + "47LGy "> > + EncodeColor(48) + "48Ros "> > + EncodeColor(49) + "49Tan "> > + EncodeColor(50) + "50LYel "> > + EncodeColor(51) + "51PGn "> > + EncodeColor(52) + "52PTrq "> > + EncodeColor(53) + "53PBlu "> > + EncodeColor(54) + "54Lav "> > + EncodeColor(55) + "55Wht "> > + EncodeColor(SelectedValue(int(Cum(1/X)%56))) + "\n"> > + "\n CURRENTLY SELECTED COLOR NUMBER: "> > + NumToStr(SelectedValue(int(Cum(1/X)%56)),5.0) ;>
 > > > ---------------------------------> Do you Yahoo!?> New Yahoo! Photos - easier uploading and sharingSend BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to suggest@xxxxxxxxxxxxx-----------------------------------------Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing






Yahoo! Groups Sponsor


  ADVERTISEMENT 









Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.