Title's text color

asnavale

Well-Known Member
#3
Hi ,

Can some senior please guide me to change texts color in title . I am attaching a file ,which show what I am looking for . Please let me know. IT would be a great help. Thanks in adv.
Use EncodeColor(colorname) function in the definition of Title. For example:


Ttl = EncodeColor(colorTurquoise) + "Single MA system, AFL by ANANT NAVALE" + "\n"
+ WriteIf(Buy, EncodeColor(colorGreen) + "Buy Triggered Today, Buy this stock Tomorrow.","")
+ WriteIf(Sell, EncodeColor(colorRed) + "Sell Triggered Today, Sell This stock Tomorrow.", "")
+ EncodeColor(colorTan) + WriteIf(Bought AND NOT Buy, "Bought @ " + BuyPrice + ". "
+ "Target Price = " + NextTgt + ", Stop Loss = " + SL + ".\n"
+ WriteIf(TgtReached, "Target Reached. Next Target = " + Ref(NextTgt, 1) + ".\n", "")
+ EncodeColor(colorGold) + "Profit / Loss so far = " + Prec(100 * (C - BuyPrice) / BuyPrice, 2) + "%", "")
+ WriteIf(Sold AND NOT Sell, "Sold @ " + SellPrice + "\nProfit / Loss in Previous Trade = " + Prec(100 * (SellPrice - BuyPrice) / BuyPrice, 2) + "%", "");

_N(Title = StrFormat("{{NAME}} ({{INTERVAL}}), {{DATE}} ; {{OHLCX}}, V=%1.0f\n {{VALUES}}\n\n", V) + Ttl);




-Anant
 

rajeabc

Well-Known Member
#4
Use EncodeColor(colorname) function in the definition of Title. For example:


Ttl = EncodeColor(colorTurquoise) + "Single MA system, AFL by ANANT NAVALE" + "\n"
+ WriteIf(Buy, EncodeColor(colorGreen) + "Buy Triggered Today, Buy this stock Tomorrow.","")
+ WriteIf(Sell, EncodeColor(colorRed) + "Sell Triggered Today, Sell This stock Tomorrow.", "")
+ EncodeColor(colorTan) + WriteIf(Bought AND NOT Buy, "Bought @ " + BuyPrice + ". "
+ "Target Price = " + NextTgt + ", Stop Loss = " + SL + ".\n"
+ WriteIf(TgtReached, "Target Reached. Next Target = " + Ref(NextTgt, 1) + ".\n", "")
+ EncodeColor(colorGold) + "Profit / Loss so far = " + Prec(100 * (C - BuyPrice) / BuyPrice, 2) + "%", "")
+ WriteIf(Sold AND NOT Sell, "Sold @ " + SellPrice + "\nProfit / Loss in Previous Trade = " + Prec(100 * (SellPrice - BuyPrice) / BuyPrice, 2) + "%", "");

_N(Title = StrFormat("{{NAME}} ({{INTERVAL}}), {{DATE}} ; {{OHLCX}}, V=%1.0f\n {{VALUES}}\n\n", V) + Ttl);




-Anant

thanks anant.
 

Similar threads