Take the price of the last dot of TopTrend indicator

 

Hi Guys,

I have the TopTrend indicator and I would like to take the price of the last dot in this cases:


1. If the previous dot was red (for a downtrend) and the actual is blue (is becoming an uptrend), I want to know the price of the last red dot;

2. If the previous dot was blue (for an uptrend) and the actual is red (is becoming a downtrend), I want to know the price of the last blue dot.


I want to give these instructions to an EA, and I need to take the price as an input data of the EA. Can you help me, please?

Thanks for all.

Regards,



Mauro




PS: Attached there's the toptrend indicator.

Files:
toptrend.mq4  6 kb
 

In the code, it shows 4 arrows and two lines

SetIndexBuffer(0,UpTrendBuffer);
SetIndexBuffer(1,DownTrendBuffer);
SetIndexBuffer(2,UpTrendSignal);
SetIndexBuffer(3,DownTrendSignal);
SetIndexBuffer(4,UpTrendLine);
SetIndexBuffer(5,DownTrendLine);
.

Use iCustom() in the EA to root out if/when/where a signal occurred

 
phy:

In the code, it shows 4 arrows and two lines

SetIndexBuffer(0,UpTrendBuffer);
SetIndexBuffer(1,DownTrendBuffer);
SetIndexBuffer(2,UpTrendSignal);
SetIndexBuffer(3,DownTrendSignal);
SetIndexBuffer(4,UpTrendLine);
SetIndexBuffer(5,DownTrendLine);
.

Use iCustom() in the EA to root out if/when/where a signal occurred



Yes, but in this way will I be able to take the price of the last dot? (It works like Parabolic SAR...where the dot has a finite value...a price).

Thanks for your help!



Mauro

Reason: