Value on left side

 
Hi.

As we can see the price on the left margin moving up and down I´m looking for the possibility to do the same with the indicators like RSI or MACD with the current value. IE: RSI is 35.93 or MACD -0.00290
Actually, you can read the current value of the indicator by pointing the mouse over it near the the line/histogram. But you need to do this every time when you want to read the current value, there is no one look way.

Is there any function insert into the code and do that?

Thanks.
 
In the data window are shown values for indicators present on chat.
 
edddim:
In the data window are shown values for indicators present on chat.



Thanks eddim.

I know that.

But I´m looking for plot the values in the indicator window.

I´d take a look to OBJ_HLINE in a attempt to create an invisible horizontal line but seems to work only with price.

Mi idea was to create an object with OBJ_HLINE and give them the current value of the indicator. When the value changes, the object is redraw.
 
If you want to redraw use that function, if not use before to check if you need to redraw
if ( ObjectGetValueByShift(ind.value,0) > 0 ) return(0);
...
// continue
 
Thanks edddim.

My first problem is to give the value to the trendline.

IE: RSI is at 53.28. So, I create a object (OBJ_HLINE) in the RSI windows but need to give them the current value (53.28). Then you move the object according with the RSI value, but this is another history.

I based my idea in the RSI code. And I have to accept I know very little about programming.

ObjectCreate("RSI line", OBJ_HLINE, 1, 0, RSIVal);

But the line do not takes the value of the RSIVal
 
If you want to create a line in your indicator window of the current RSI value:
...  
 Price=iRSI(NULL,0,14,PRICE_CLOSE,HLineTime);
 if ( ObjectFind(HLineName) != -1) 
  {
   return(0); // or delete with ObjectDelete(HLineName);
  } 
 if ( !ObjectCreate( HLineName, OBJ_HLINE, 0, Time[HLineTime], Price) )
  {
   err=GetLastError();
   Print("error: can not create HLine! code #",err," ",ErrorDescription(err));
   return(0);
  }
 else
  { 
   ObjectSet(HLineName, OBJPROP_PRICE1, Price);
   ObjectSet(HLineName, OBJPROP_COLOR, HLineCollor);
   ObjectSet(HLineName, OBJPROP_WIDTH, HLineSize);
   ObjectsRedraw();
  }
...
But it is easier to use Arrow, becouse if you have more there will be overflow with lines on your chart...
If you just need one line at time you should use the marked with gray to delete the one before instead of return(0).
 
Sorry edddim.

But like I said my knowledge about programming is very poor.

I understand what are you explaining with the code. But I have many doubts and I think it´s too high for me.

If you let me request some help I appreciate that.

Taking a look at the RSI code I guess I do not need to call the iRSI function because I can use directly the RSIBuffer which have the current value of the indicator.

But then, I don´t know how to proceed with the rest of the code.

Could you be so gentle to put the code after the modifications.


If you can´t, don´t worry you had been so gentle to try to help.
 
You want to put Arrow UP or/and Arrow DOWN, from the last change from some indicator, like in the Market Data window.
But do you want arrow change to be, from the last bar change or from the last indicator Direction change?
 
As you can see on left side of the both indicators there is a value (6019 and 23430.7), which is the current value. The idea is to don´t have open the data window.

To plot this value I have made a invisible horizontal trendline on the second indicator.

The same, it can be made by adding a level as you can see on the first indicator.

But, in both ways you need to move the line or the level every time the value changes.

I don´t know if there is another way to watch the current value whiteout activate the data window or moving the mouse over the indicator every time you need to know that. Activate the data window expends a valuable screen space.

 
if you want to see more values on the left side, where is the name of the indicator from different indicators without opening them, you can write additional indicator, with up to 8 buffers (depends on how many buffers have the other indicators) you can than see the values there from other indicators, ex.:
ind_buffer_rsi[0] = iRSI(NULL,0,14,PRICE_CLOSE,bar_shift);
ind_buffer_macd[0] = iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,bar_shift)-
                     iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,bar_shift);
/* ... up to 8 buffers and indicate the names in IndicatorShortName */
Or the other way is to put the values on chart in Comment or as Labels, on that way you can put more than 8
Comment ("RSI : ",ind_rsi, "\nMACD : ",ind_macd),"\nmore here..");
In second way you do not have to assign them as buffers, and it is simplier as you do not have to write buffers, just assign the indicators to the variables like previous sample but without brackets(buffer array) and add them in comment.
 
Thanks edddim.

I learned a lot
Reason: