Changing Color of bar based on entry/exit possible?

 

Hello,


Is it possible to change the color of the bar where a trade entry and exit has happened? 


Thank you

 

Of course, just like Heiken Ashi does.

 
     for (int i=0; i < OrdersTotal(); i++) 
   {

      OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
      
         if (OrderSymbol() == Symbol()) 
         
         {
   
            if (OrderType() == OP_BUY) 
               {     

                                int theBarOfTheOrder = iBarShift(Symbol(), 0, OrderOpenTime());

                                 // what to do to change the color of the bar/candle?

               }
         }

    }


Not sure if the above loop is the most effective way to do this, 

Reason: