07/12/12 20:35:20.19 YgFIhfcl
すまぬ、今日初めてMT4いじったばかりでEAソースといわれても何のことかわからん
それに当方プログラムに関して知識ゼロのド素人なもんで
とりあえずテンプレのカスタムテクニカル指標配布サイトにあったLRLをエディタで開いて
MAのソース参考にしてシフト移動出来るよう数行足しただけです
たぶんLRLをシフト移動させて使う人がいないから省かれてたのかな?
とりあえずソースといわれたので
--------------------------------------------------------------------------
#property copyright "MQL Service"
#property link "www.mqlservice.com"
#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Orange
#property indicator_width1 2
//---- input parameters
extern int LRLPeriod=14;
extern int LRL_Shift=0;
//---- buffers
double LRLBuffer[];
int shift=0;
int n=0;
double sumx=0, sumy=0, sumxy=0, sumx2=0, sumy2=0;
double m=0, yint=0, r=0;
//+------------------------------------------------------------------+
//| INITIALIZATION FUNCTION |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,LRLBuffer);
IndicatorDigits(Digits);
if(LRLPeriod < 2) LRLPeriod = 2;
IndicatorShortName("Linear Regression Line ("+LRLPeriod+")");
SetIndexDrawBegin(0,LRLPeriod+2);
SetIndexShift(0,LRL_Shift);
IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS)+4);
//----
return(0);
}
--------------------------------------------------------------------------
あとは最後まで元々のLRLのソースのままです