How do I read a label from indicator

 

I have access to a indicator that writes to the chart in a known label. How do I read that information in?

Is it as simple as:

string myVar = LabelName;

very generic I know, I am just not accustomed to collecting the indicator data via text labels. In the above, I assume, the name of the label in place of LabelName.

 
ObjectDescription()

ObjectDescription()

 

Thanks, I was pretty tired last night, figured it wouldn't be too difficult, just a brain fart.

 

Ok, now I am stumped. I am attempting to compare 2 strings, one is a wingding value representing either a up arrow or a down arrow. The value shown in the text of the label object is either "ê" and the other "é". So I set up 2 comparrison strings each with these valeus. If either of them is spotted, then trade accordingly.

// collect the object text into a couple of strings:
   if(ObjectFind("CP_CONFIRM_PRIOR_TREND")!= -1)
   {
      txtConfirmPriorTrend = ObjectDescription("CP_CONFIRM_PRIOR_TREND");
   }
   
   if(ObjectFind("CP_CONFIRM_RELEVANCE")!= -1)
   {
      txtConfirmRelevance = ObjectDescription("CP_CONFIRM_RELEVANCE");
   }

// later after other code, declare comparrison strings
   string ArrowDown = "ê"; 
   string ArrowUp = "é";

// Now compare the two sets of strings
// Sells :

   if (txtConfirmPriorTrend == ArrowDown && txtConfirmRelevance == ArrowDown)
   {
      return (1);
   }

   if (txtConfirmPriorTrend == ArrowUp && txtConfirmRelevance == ArrowDown)
   {
      return (1);
   }

// Buys :
   if (txtConfirmPriorTrend == ArrowUp && txtConfirmRelevance == ArrowUp)
   {
      return (1);
   }
   
   if (txtConfirmPriorTrend == ArrowDown && txtConfirmRelevance == ArrowUp)
   {
      return (1);
   }
 

I can see it has been a busy Monday, so bump.

 
Larry i sent you a pm
 

Thank you Ted. Just to re-itterate, I already solved the problem by creating a couple of indicator buffer arrays then passed a "d" for down and "u" for up on the other. Then collect the data using iCustom on the EA. This achieved the goal.

By the way, I highly recommend sxTed's indicator Candle_Patterns, it has been a real diamond in the rough, good coding and nice signals. Ted, you will get some contributions to your charitiable cause when we can put it to work.