Trend Wave
Created on 8/20/2015 9:12:56 AM
#property copyright "Copyright © 2015 | FXProSystems.com"
#property link "http://fxprosystems.com/"
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Lime
#property indicator_color2 Red
extern bool SoundON = TRUE;
extern bool EmailON = FALSE;
extern int KPeriod = 5;
extern int DPeriod = 3;
extern int Slowing = 3;
extern int MA_Method = 0;
extern int PriceField = 0;
extern double UpLevel = 80.0;
extern double DownLevel = 20.0;
double buf_120[];
double buf_124[];
int int128 = 0;
int int132 = 0;
// E37F0136AA3FFAF149B351F6A4C948E9
int init() {
SetIndexStyle(0, DRAW_ARROW, EMPTY);
SetIndexArrow(0, 233);
SetIndexBuffer(0, buf_120);
SetIndexStyle(1, DRAW_ARROW, EMPTY);
SetIndexArrow(1, 234);
SetIndexBuffer(1, buf_124);
return (0);
}
// 52D46093050F38C27267BCE42543EF60
int deinit() {
return (0);
}
// EA2B2676C28C0DB26D39331A336C6B92
int start() {
int li_8;
double istochastic_20;
double istochastic_28;
double istochastic_36;
double istochastic_44;
double ld_52;
double ld_60;
double ld_unused_12 = 0;
int li_68 = IndicatorCounted();
if (li_68 < 0) return (-1);
if (li_68 > 0) li_68--;
int li_0 = Bars - li_68;
for (int shift_4 = 1; shift_4 <= li_0; shift_4++) {
li_8 = shift_4;
ld_52 = 0;
ld_60 = 0;
for (li_8 = shift_4; li_8 <= shift_4 + 9; li_8++) ld_60 += MathAbs(High[li_8] - Low[li_8]);
ld_52 = ld_60 / 10.0;
istochastic_20 = iStochastic(NULL, 0, KPeriod, DPeriod, Slowing, MA_Method, PriceField, MODE_MAIN, shift_4);
istochastic_36 = iStochastic(NULL, 0, KPeriod, DPeriod, Slowing, MA_Method, PriceField, MODE_MAIN, shift_4 + 1);
istochastic_28 = iStochastic(NULL, 0, KPeriod, DPeriod, Slowing, MA_Method, PriceField, MODE_SIGNAL, shift_4);
istochastic_44 = iStochastic(NULL, 0, KPeriod, DPeriod, Slowing, MA_Method, PriceField, MODE_SIGNAL, shift_4 + 1);
buf_120[shift_4] = 0;
buf_124[shift_4] = 0;
if (istochastic_20 > istochastic_28 && istochastic_36 < istochastic_44 && istochastic_20 <= DownLevel && istochastic_28 <= DownLevel && istochastic_36 <= DownLevel &&
istochastic_44 <= DownLevel) {
if (shift_4 == 1 && int128 == FALSE) {
int128 = TRUE;
int132 = FALSE;
if (SoundON) {
Alert("BUY signal at Ask=", Ask,
"\n Bid=", Bid,
"\n Time=", TimeToStr(TimeCurrent(), TIME_DATE), " ", TimeHour(TimeCurrent()), ":", TimeMinute(TimeCurrent()),
"\n Symbol=", Symbol(), " Period=", Period());
}
if (EmailON) {
SendMail("BUY signal alert", "BUY signal at Ask=" + DoubleToStr(Ask, 4) + ", Bid=" + DoubleToStr(Bid, 4) + ", Date=" + TimeToStr(TimeCurrent(), TIME_DATE) + " " +
TimeHour(TimeCurrent()) + ":" + TimeMinute(TimeCurrent()) + " Symbol=" + Symbol() + " Period=" + Period());
}
}
buf_120[shift_4] = Low[shift_4] - 0.75 * ld_52;
} else {
if (istochastic_20 < istochastic_28 && istochastic_36 > istochastic_44 && istochastic_20 >= UpLevel && istochastic_28 >= UpLevel && istochastic_36 >= UpLevel && istochastic_44 >= UpLevel) {
if (shift_4 == 1 && int132 == FALSE) {
int132 = TRUE;
int128 = FALSE;
if (SoundON) {
Alert("SELL signal at Ask=", Ask,
"\n Bid=", Bid,
"\n Date=", TimeToStr(TimeCurrent(), TIME_DATE), " ", TimeHour(TimeCurrent()), ":", TimeMinute(TimeCurrent()),
"\n Symbol=", Symbol(), " Period=", Period());
}
if (EmailON) {
SendMail("SELL signal alert", "SELL signal at Ask=" + DoubleToStr(Ask, 4) + ", Bid=" + DoubleToStr(Bid, 4) + ", Date=" + TimeToStr(TimeCurrent(), TIME_DATE) + " " +
TimeHour(TimeCurrent()) + ":" + TimeMinute(TimeCurrent()) + " Symbol=" + Symbol() + " Period=" + Period());
}
}
buf_124[shift_4] = High[shift_4] + 0.75 * ld_52;
}
}
}
return (0);
}
This indicator can be used as a signal provider for
LOCTrader Expert Advisor.
EURUSD
USDJPY
GBPUSD
USDCHF
M1
M5
M15
M30
Hourly
H4
Daily
Buy Signals
Condition 1
Stochastic Signal
%K:5 %D:3 Slowing:3 MA Method:Simple Price Field:Low/High
Is Above
Stochastic Signal
%K:5 %D:3 Slowing:3 MA Method:Simple Price Field:Low/High
Sell Signals
Condition 2
Stochastic Signal
%K:5 %D:3 Slowing:3 MA Method:Simple Price Field:Low/High
Is Above
Stochastic Signal
%K:5 %D:3 Slowing:3 MA Method:Simple Price Field:Low/High
To download this signal indicator you need to register or login. It is free.
Please Login
Password is required.
|
Create Account
First Name is required.
Last Name is required.
Email is required.
This Email address is already registered.
Password is required.
Password and confirm password fields must be same.
This is a custom indicator for Metatrader 4 platform. To use it you need:
- Download this indicator and copy into your metatrader experts/indicators folder.
- Restart your Metatrader 4 terminal.
- Indicator will appear under Custom Indicators section. Attach the indicator on the chart.