Light Style© by Fisana

Перейти к содержимому


Инвестиционные фонды NordFx: профессиональное управление и прозрачность


NordFX

Фотография
- - - - -

GreenTrader & Trend (по просьбе Munmar)


  • Пожалуйста, авторизуйтесь, чтобы ответить
2 ответов в этой теме

#1 Nikitich

Nikitich

    живет тут

  • Пользователи ST test (off)
  • PipPipPipPipPip
  • 497 сообщений

Опубликовано 16 Ноябрь 2005 - 09:49

GreenTrader & Trend (по просьбе Munmar)

GREEN TRADER

//+------------------------------------------------------------------+
//| GreenTrader.mq4 |
//| |
//| |
//+------------------------------------------------------------------+
#property copyright "Slim"
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 DarkViolet
#property indicator_level1 0.0
//---- input parameters
//extern int x_prd=0;
extern int period1=21;
extern int period2=44;
extern int period3=89;
extern int period4=200;
extern int depth =15;
extern int CountBars=3000;
//---- buffers
double Line[];
//double indOBV[];
//double prise[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicator line
IndicatorBuffers(2);
SetIndexBuffer(0,Line);

SetIndexStyle(0,DRAW_LINE,EMPTY, 2);


//----

//----
return(0);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int start()
{
int i,j;
double EMA1[10],EMA2[10],EMA3[10],EMA4[10];
//----

//----
if (CountBars<Bars-period4-1)
i=CountBars;
else
i=Bars-period4-1;
while(i>=0)
{
Line[i]=0;
j=0;
while(j<=depth)
{
if ( iMA(NULL,0,period1,0 ,MODE_EMA,PRICE_CLOSE,i+j)>iMA(NULL,0,period1,0 ,MODE_EMA,PRICE_CLOSE,i+j+1) )
EMA1[j] =1;
else
EMA1[j] =-1 ;
if ( iMA(NULL,0,period2,0 ,MODE_EMA,PRICE_CLOSE,i+j)>iMA(NULL,0,period2,0 ,MODE_EMA,PRICE_CLOSE,i+j+1) )
EMA2[j] =1;
else
EMA2[j] =-1 ;
if ( iMA(NULL,0,period3,0 ,MODE_EMA,PRICE_CLOSE,i+j)>iMA(NULL,0,period3,0 ,MODE_EMA,PRICE_CLOSE,i+j+1) )
EMA3[j] =1;
else
EMA3[j] =-1 ;
if ( iMA(NULL,0,period4,0 ,MODE_EMA,PRICE_CLOSE,i+j)>iMA(NULL,0,period4,0 ,MODE_EMA,PRICE_CLOSE,i+j+1) )
EMA4[j] =1;
else
EMA4[j] =-1 ;




j++;
}
//if (i==0) Alert(EMA1[0]," ", EMA1[1]," ",EMA1[2]," ",EMA1[3]," ");

for(j=0;j<=depth;j++)
{
Line[i]=Line[i]+EMA1[j]+EMA2[j]+EMA3[j]+EMA4[j];
}
i--;
}
return(0);
}
//+------------------------------------------------------------------+


TREND

//+------------------------------------------------------------------+
//| Trend.mq4 |
//| |
//| Ramdass - Conversion only |
//+------------------------------------------------------------------+

#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Red
//---- input parameters
extern int Bands_Mode_0_2=0; // =0-2 MODE_MAIN, MODE_LOW, MODE_HIGH
extern int Power_Price_0_6=0; // =0-6 PRICE_CLOSE,PRICE_OPEN,PRICE_HIGH,PRICE_LOW,PRICE_MEDIAN,PRICE_TYPICAL,PRICE_WEIGHTED
extern int Price_Type_0_3=0; // =0-3 PRICE_CLOSE,PRICE_OPEN,PRICE_HIGH,PRICE_LOW
extern int Bands_Period=20;
extern int Bands_Deviation=2;
extern int Power_Period=13;
extern int CountBars=300;
//---- buffers
double value[];
double value2[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
// string short_name;
//---- indicator line
IndicatorBuffers(2);
SetIndexStyle(0,DRAW_LINE);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(0,value);
SetIndexBuffer(1,value2);
//----

//----
return(0);
}
//+------------------------------------------------------------------+
//| Trend |
//+------------------------------------------------------------------+
int start()
{
SetIndexDrawBegin(0,Bars-CountBars+Bands_Period+1);
SetIndexDrawBegin(1,Bars-CountBars+Bands_Period+1);
int i,CurrentBar,Bands_Mode,counted_bars=IndicatorCounted();
double Power_Price,CurrentPrice;
//----
if(Bars<=Bands_Period) return(0);
//---- initial zero
if(counted_bars<Bands_Period)
{
for(i=1;i<=Bands_Period;i++) value[Bars-i]=0.0;
for(i=1;i<=Bands_Period;i++) value2[Bars-i]=0.0;
}
//----
i=CountBars-Bands_Period-1;
if(counted_bars>=Bands_Period) i=CountBars-counted_bars-1;


if (Bands_Mode_0_2==1) Bands_Mode=MODE_LOW;
if (Bands_Mode_0_2==2) Bands_Mode=MODE_HIGH;
if (Bands_Mode_0_2==0) Bands_Mode=MODE_MAIN;

if (Power_Price_0_6==1) Power_Price=PRICE_OPEN;
if (Power_Price_0_6==2) Power_Price=PRICE_HIGH;
if (Power_Price_0_6==3) Power_Price=PRICE_LOW;
if (Power_Price_0_6==4) Power_Price=PRICE_MEDIAN;
if (Power_Price_0_6==5) Power_Price=PRICE_TYPICAL;
if (Power_Price_0_6==6) Power_Price=PRICE_WEIGHTED;
if (Power_Price_0_6==6) Power_Price=PRICE_CLOSE;

for (i=CountBars-1; i>=0; i--)
{
if (Price_Type_0_3==1) CurrentPrice=Open[i];

if (Price_Type_0_3==2) CurrentPrice=High[i];

if (Price_Type_0_3==3) CurrentPrice=Low[i];
if (Price_Type_0_3==0) CurrentPrice=Close[i];

value[i]=CurrentPrice-iBands(NULL,0,Bands_Period,Bands_Deviation,0,Bands_Mode,Power_Price,i);
value2[i]=-(iBearsPower(NULL,0,Power_Period,Power_Price,i)+iBullsPower(NULL,0,Power_Period,Power_Price,i));

}


return(0);
}
//+------------------------------------------------------------------+

#2 Neptun

Neptun

    прописался

  • Пользователи ST test (off)
  • PipPipPip
  • 53 сообщений

Опубликовано 16 Ноябрь 2005 - 08:22

Уважаемый Nikitich.
Если не сложно, объясните в двух словах - Чем хорош и что умеет индикатор "GREEN TRADER".
Без комментариев как то суховато.
Дорогу осилит идущий

#3 Slim

Slim

    живет тут

  • Пользователи ST test (off)
  • PipPipPipPipPip
  • 245 сообщений

Опубликовано 26 Ноябрь 2005 - 02:28

Уважаемый Nikitich.
Если не сложно, объясните в двух словах - Чем хорош и что умеет индикатор "GREEN TRADER".
Без комментариев как то суховато.


Так это ж всё здесь:
http://forum.masterf...p?p=11093#11093
С уважением, Slim




Посетителей, читающих эту тему: 0

0 пользователей, 0 гостей, 0 анонимных пользователей

Рейтинг брокеров форекс: кто лидер, кто аутсайдер и почему?




Masterforex-V NordFX

Rambler's Top100

Принимаем Z-Payment