When I was trying to figure this out I studied the program Fractals - it comes with MT4.
Pay attention to this line of code from Fractals:
ExtUpFractalsBuffer[i]=dCurrent;
Also some arrows will point directly at a price and some arrows will only point close to a price.
Special Arrow codes that exactly points to price and time. It can be one of the following values:
Constant | Value | Description |
---|---|---|
1 | Upwards arrow with tip rightwards (↱). | |
2 | Downwards arrow with tip rightwards (↳). | |
3 | Left pointing triangle (◄). | |
4 | En Dash symbol (–). | |
SYMBOL_LEFTPRICE | 5 | Left sided price label. |
SYMBOL_RIGHTPRICE | 6 | Right sided price label. |
If you want them exactly at a price, you must use one of the above arrow codes.
Approximately use
switch(Period()) { case 1: nShift = 1; break; case 5: nShift = 3; break; case 15: nShift = 5; break; case 30: nShift = 10; break; case 60: nShift = 15; break; case 240: nShift = 20; break; case 1440: nShift = 80; break; case 10080: nShift = 100; break; case 43200: nShift = 200; break; }From https://www.mql5.com/en/code/10647
yes yes exactly
OK, change this . . .
if (Osma0 > 0 && Osma1 < 0) { buy [i] = Low [i] - 5 * Point; if (Period () >= PERIOD_M30) buy [i] -= 8 * Point; if (Period () >= PERIOD_H1) buy [i] -= 8 * Point; if (Period () >= PERIOD_H4) buy [i] -= 8 * Point; if (Period () >= PERIOD_D1) buy [i] -= 8 * Point; if (Period () >= PERIOD_W1) buy [i] -= 12 * Point; if (Period () >= PERIOD_MN1) buy [i] -= 60 * Point; } if (Osma0 < 0 && Osma1 > 0) { sell [i] = High [i] + 5 * Point; if (Period () >= PERIOD_M30) sell [i] += 8 * Point; if (Period () >= PERIOD_H1) sell [i] += 8 * Point; if (Period () >= PERIOD_H4) sell [i] += 8 * Point; if (Period () >= PERIOD_D1) sell [i] += 8 * Point; if (Period () >= PERIOD_W1) sell [i] += 12 * Point; if (Period () >= PERIOD_MN1) sell [i] += 60 * Point; } }
to this . . .
if (Osma0 > 0 && Osma1 < 0) { buy [i] = High [i]; } if (Osma0 < 0 && Osma1 > 0) { sell [i] = Low [i]; } }
OK, change this . . .
to this . . .
thanks for u r help,
makkala
hi friends,
am trying to code ma oscillator cross above 0 ubove/below,
there is appearing arrows but i need them at high of the candle(blue arrow) and low of the candle (red arrow),
and also need alert functions in all time frames,
plzz help me,to code
thanks
please is this an EA
please is this an EA
#property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 DarkBlue #property indicator_color2 Red #property indicator_width1 3 #property indicator_width2 3What does it say ???
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
hi friends,
am trying to code ma oscillator cross above 0 ubove/below,
there is appearing arrows but i need them at high of the candle(blue arrow) and low of the candle (red arrow),
and also need alert functions in all time frames,
plzz help me,to code
thanks