5ちゃんねる ★スマホ版★ ■掲示板に戻る■ 全部 1- 最新50  

■ このスレッドは過去ログ倉庫に格納されています

【MT4/5】MetaTrader初心者専用42【ゆとり隔離スレ】

631 :Trader@Live!:2014/04/18(金) 08:50:27.81 ID:XLiP680A
トレステみたいに言語仕様を変えないベンダーだったらなあ。

MT3のMQL2とMT4のMQL4は違う
MT4のMQL4とMT5のMQL5はこれまた違う

MQL2のAROONのソースだけど、簡単でしょ?
BASICライクだし、Easy Languageくらいの簡単さ。

Name: = Aroon_Horn
Author: = Copyright c 2004, Horn
Link: = alexander@indus.ru
Separate Window: = Yes
First Color: = Blue
First Draw Type: = Line
First Symbol: = 217
Use Second Data: = Yes
Second Color: = Red
Second Draw Type: = Line
Second Symbol: = 218
Minimum Chart Limits: = -5.000000
Maximum Chart Limits: = 105.000000
]] * /

Inputs: calculate_period (10);
var: shift (0);
var: HighestBar (0), LowestBar (0);
var: aroonUp (0), aroonDn (0);

SetLoopCount (0);

for shift = Bars-calculate_period Downto 0 {

HighestBar = Highest (MODE_HIGH, shift + calculate_period-1, calculate_period);

LowestBar = Lowest (MODE_LOW, shift + calculate_period-1, calculate_period);

aroonUp = 100 - ((HighestBar - shift) / calculate_period) * 100;
aroonDn = 100 - ((LowestBar - shift) / calculate_period) * 100;

if (aroonUp == 0) then {aroonUp = 0.0000001; }
if (aroonDn == 0) then {aroonDn = 0.0000001; }

/ / Show the line
SetIndexValue (shift, aroonUp);
SetIndexValue2 (shift, aroonDn);
};

299 KB
★スマホ版★ 掲示板に戻る 全部 前100 次100 最新50

read.cgi ver 05.04.00 2017/10/04 Walang Kapalit ★
FOX ★ DSO(Dynamic Shared Object)