Changing Chart Comments to Right Side

 

Hello,


In default, all the Comments texts shown on Left side. I want to change this to Right side.




void OnTick() {
ChartComment();
}

void ChartComment()
  {

   string buy_l = (Buy_Limit && !Close_Buy_Limit) ? "Active" : "Paused";
   string sell_l = (Sell_Limit && !Close_Sell_Limit) ? "Active" : "Paused";
   string buy_s = (Buy_Stop && !Close_Buy_Stop) ? "Active" : "Paused";
   string sell_s = (Sell_Stop && !Close_Sell_Stop) ? "Active" : "Paused";
   string nw_trade = New_Trade ? "Active" : "Paused";
   string panic_c = Close_Panic ? "Active" : "Inactive";
   string t_hours = trading_timed() ? "Active" : "Paused";
   string tp_m_c = Tp_In_money ? "Active" : "Inactive";
   string trail_s = Dtrailing ? "Active" : "Inactive";
   string trail_t = (Trailing_Type == Group) ? "Group" : (Trailing_Type == Single) ? "Single" : "Error";
   string t_style = (Trading_Strategy == Custom) ? "Custom" : (Trading_Strategy == MartingaleHedging_TrailingTP) ? "Martingale + Hedging + Trailing TakeProfit" : (Trading_Strategy == MartingaleHedging_TrailingSL) ? "Martingale + Hedging + Trailing StopLoss" : (Trading_Strategy == ReverseMartingale) ? "Reverse Martingale" : (Trading_Strategy == Martingale_ReverseMartingale_Hedging) ? "Martingale + Reverse Martingale + Hedging" : (Trading_Strategy == Scalping_TP) ? "Scalping + Take Profit" : (Trading_Strategy == Scalping_TrailingSL) ? "Scalping + Trailing StopLoss" : "Unknown";

   if(Trading_Strategy != Scalping_TP && Trading_Strategy != Scalping_TrailingSL)
     {
      string mhc_news = ("\n :: News Status            : " + News_Trade_Status +
                         "\n :: News Closing           : " + News_Trade_Closing +
                         "\n :: Last News Downloaded   : " + XMLDownloadTime +
                         "\n :: Last News Read         : " + XMLReadTime +
                         "\n :: Last News Updated      : " + XMLUpdateTime +
                         "\n :: Last News Checked      : " + XMLUpcomingImpact +
                         "\n ------------------------------------------------");
      string mh_c = ("\n :: DiMarti                : " + DiMarti +
                     "\n :: Star_ModifTpSL         : " + Star_ModifTp +
                     "\n :: Tp_in_money            : " + Money_In_TP + " (" + tp_m_c +")");
     }



   string CommentPartOne = " ---------------------------------------------"
                           "\n :: ===>EA<==="
                           "\n :: Spread                 : " + DoubleToStr(MarketInfo(Symbol(), MODE_SPREAD), 0) +
                           "\n :: Leverage               : 1 : " + IntegerToString(AccountLeverage()) + " ("+TradingAccountType+" Account)" +
                           "\n :: Stop Level             : " + MarketInfo(Symbol(), MODE_STOPLEVEL) +
                           "\n :: " + Symbol() + " Floating P/L   : " + DoubleToStr(symbolfloatingBalance, 2) + " |::| EA Floating : " + symbolEAfloating + " ==> Buy Limit (" + BuyLimitFloating + ") + Sell Limit (" + SellLimitFloating + ") + Buy Stop (" + BuyStopFloating + ") + Sell Stop (" + SellStopFloating + ")" +
                           "\n ------------------------------------------------"
                           "\n :: Trade mode             : " + Trade_Mode_Status +
                           "\n :: New Trade              : " + nw_trade +
                           "\n :: Panic Close            : " + panic_c +
                           "\n :: Trading Time           : " + t_hours +
                           "\n :: Trading Days           : " + Day_Trading_Status +
                           "\n :: License                : " + UserTradeAccount +
                           "\n ------------------------------------------------" + mhc_news,


                           CommentPartTwo = "\n :: PC Timezone (GMT)      : " + localHours + ":" + localMinutes +
                                 "\n :: Broker Timezone (GMT)  : " + brokerHours + ":" + brokerMinutes +
                                 "\n ------------------------------------------------"
                                 "\n :: Trading Style          : " + t_style +
                                 "\n :: Trade Orders           : (Buy Limit : " + buy_l + ") |:| (Sell Limit : " + sell_l + ") |:| (Buy Stop : " + buy_s + ") |:| (Sell Stop : " + sell_s + ")" +
                                 "\n :: LevelMax               : " + Level_Max +
                                 "\n :: Range                  : " + Range +
                                 "\n :: Lot                    : " + Lot_Size +
                                 "\n :: SL                     : " + SL +
                                 "\n :: TP                     : " + TP + mh_c +
                                 "\n :: Trailing          : (Trailing Status : " + trail_s + ") |:| (Trailing Type : " + trail_t + ") |:|  (Trailing Gap : " + Trailing_Gap +") |:| (Trailing TP : " + Trailing_TP + ")" +
                                 "\n :: Trailing TP          : " + Trailing_TP +
                                 "\n ------------------------------------------------";



   Comment(CommentPartOne + CommentPartTwo);
  }


I need this because, due to the comment texts trade information getting Unclear and difficult to read.



To



 
i dont think it is possible without changing your comments into objects.

EDIT: Or do as i do: add spaces to beginning of each line so that the tickets and open trade info are shown to the left of each comment.
 
Michael Charles Schefe #:
i dont think it is possible without changing your comments into objects.

EDIT: Or do as i do: add spaces to beginning of each line so that the tickets and open trade info are shown to the left of each comment.


Looks little awkward but manageable. Thank you :)

 
anuj71 #:


Looks little awkward but manageable. Thank you :)

maybe "busy", but not awkward, nahhhh.
It might look better if you had 2 columns and the long lines -- turn those into 2 lines(each), and then add a blank line (or 2) at the top.

EDIT: but i think that if my OSD was as busy as that -- i would turn all of that into objects as referred to by William. Not sure why tho. I think it would be just as complicated to code as the current OSD.
Reason: