OBJ_PITCHFORK and ObjectGetValueByShift

 

Is it possible to get price data of an OBJ_PITCHFORK at a given bar index?

I used ObjectGetValueByShift(), but it doesn't give any useful result (0).

ObjectGetValueByShift's documentation says:
Applied to trendlines and similar objects.

A pitchfork is actually 3 parallel trend lines.

So, why ObjectGetValueByShift() doesn't work with it?

Any solution?

Thanks

 
DonFx:

Is it possible to get price data of an OBJ_PITCHFORK at a given bar index?

I used ObjectGetValueByShift(), but it doesn't give any useful result (0).

ObjectGetValueByShift's documentation says:
Applied to trendlines and similar objects.

A pitchfork is actually 3 parallel trend lines.

So, why ObjectGetValueByShift() doesn't work with it?

Any solution?

Thanks


I could be wrong, but I'm pretty sure you have to make your own function by getting the coordinates of the anchor points and calculating the slope...

 
nicholishen:

I could be wrong, but I'm pretty sure you have to make your own function by getting the coordinates of the anchor points and calculating the slope...

Yes, I've already done it.

I don't understand why did MQ forget pitchfork when made ObjectGetValueByShift().