//+------------------------------------------------------------------+ //| SHI_SilverTrendSig.mq4 | //| Copyright © 2003, VIAC.RU, OlegVS, GOODMAN, 2005 Shurka | //| shforex@narod.ru | //| | //| | //| | //+------------------------------------------------------------------+ #property copyright "Copyright © 2005, Shurka" #property link "http://shforex.narod.ru" //---- #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Red #property indicator_color2 Blue #define SH_BUY 1 #define SH_SELL -1 //---- Входные параметры extern int AllBars=0;//How many bars should be counted. 0 - all the bars. extern int Otstup=30;//Step back. extern double Per=9;//Period. int SH,NB,i,UD; double R,SHMax,SHMin; double BufD[]; double BufU[]; //+------------------------------------------------------------------+ //| Функция инициализации | //+------------------------------------------------------------------+ int init() { //We will write the number of the bars for which we are counting to the NB if (BarsBars-CB) NB=Bars-CB; for(SH=1;SHSHMax-(SHMax-SHMin)*Otstup/100 && UD!=SH_BUY) { BufD[SH]=High[SH]+R*0.5; UD=SH_BUY; } } return(0); } //+------------------------------------------------------------------+