I want it to take the data from the different timeframes, and on the basis of logical events draw markers in a certain place of the chart.
For example, EMA 5 crosses EMA 20 up at 1 min TF, the indicator draws up arrow. At 15 min TF EMA 5 is under 20 EMA , then the indicator draws the down arrow next
to the previous one arrow up.
I use:
Add (PeriodType.Minute, TF1); / / (TF1 = 1 min)
Add (PeriodType.Minute, TF2); / / (TF2 = 5 min)
then I use
double valueTF11 = EMA (BarsArray [1], period1) [0];
double valueTF12 = EMA (BarsArray [1], period2) [0];
double valueTF21 = EMA (BarsArray [2], period1) [0];
double valueTF22 = EMA (BarsArray [2], period2) [0];
then the logical processing and I draw arrows as shown in the
CustomPlotSample. The problem is that TF = 1 minute everything is displayed correctly, but when I switch to another timeframe arrows do not appear. I need to
display a set of arrows from others timeframes on any timeframe.
Can you tell me what I'm doing wrong or how to solve this problem?
Now, there are arrows on the M1, and when change the timeframe they disappear. The arrows indicate when the different timeframes MA arranged in order. Let's say when, for example, on the M5 MA 5, MA 20, MA 30, one below the other, respectively, second arrow down. When they are on the M5 in order up one above the other 5, 20, 30, the second of the arrow is up. Each arrow corresponds to a specific timeframe. The arrows disappear at any timeframe than M1. How to win it, do not understand!?
P.S. I hope I do it right and clearly explained what my problem is. English is a foreign language for me and I have not had much experience of communication.
Comment