X



[MT4/5] Metatrader Cafe [初心者]
■ このスレッドは過去ログ倉庫に格納されています
0001名無しさん@お金いっぱい。
垢版 |
2020/11/11(水) 18:53:46.49ID:Sy9S1s920
とりあえず立てました
0003名無しさん@お金いっぱい。
垢版 |
2020/11/11(水) 19:00:10.54ID:lA1MTlSn0
//-[RSI Dots]

#property indicator_separate_window
#property indicator_minimum 0
#property indicator_maximum 100

#property indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Aqua
#property indicator_level1 75
#property indicator_level2 65
#property indicator_level3 35
#property indicator_level4 25

extern int RSIPeriod = 12;

double dRsiLine[];
double dRsiDots[];

int init(){

IndicatorShortName("RSI Dots (" + RSIPeriod + ")");

SetIndexBuffer(0,dRsiLine);
SetIndexStyle (0,DRAW_LINE);
SetIndexLabel (0,"RSI");

SetIndexBuffer(1,dRsiDots);
SetIndexStyle (1,DRAW_ARROW);
SetIndexArrow (1,159);
SetIndexLabel (1,"RSI");

return(0);}

int start(){

int iBarsToCalc = Bars - IndicatorCounted();
if (iBarsToCalc < Bars) iBarsToCalc++;

for (int i=iBarsToCalc-1;i>=0;i--) {
dRsiLine[i] = iRSI(NULL,0,RSIPeriod,PRICE_CLOSE,i);
dRsiDots[i] = dRsiLine[i];}return(0);}


60行まで貼れるよ
0005名無しさん@お金いっぱい。
垢版 |
2020/11/11(水) 19:07:45.48ID:vdTR619M0
//-[Indicator Ma3Line.mq4]

#property indicator_chart_window
#property indicator_buffers 3

#property indicator_color1 SkyBlue
#property indicator_width1 1
#property indicator_style1 STYLE_SOLID

#property indicator_color2 Coral
#property indicator_width2 1
#property indicator_style2 STYLE_SOLID

#property indicator_color3 Gold
#property indicator_width3 1
#property indicator_style3 STYLE_SOLID

extern int m1 = 10;
extern int m2 = 20;
extern int m3 = 50;

double m1B[];
double m2B[];
double m3B[];

int init(){

SetIndexBuffer(0,m1B);
SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,1,SkyBlue);
SetIndexDrawBegin(0,m1 - 1);
SetIndexLabel(0,"M1");

SetIndexBuffer(1,m2B);
SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,1,Coral);
SetIndexDrawBegin(1,m2 - 1);
SetIndexLabel(1,"M2");

SetIndexBuffer(2,m3B);
SetIndexStyle(2,DRAW_LINE,STYLE_SOLID,1,Gold);
SetIndexDrawBegin(2,m3 - 1);
SetIndexLabel(2,"M3");

return(0);}

int deinit(){

return(0);}

int start(){

int i, limit = Bars-IndicatorCounted();

for(i=limit-1; i>=0; i--)
{
m1B[i] = iMA(NULL,0,m1,0,MODE_EMA,PRICE_CLOSE,i);
m2B[i] = iMA(NULL,0,m2,0,MODE_EMA,PRICE_CLOSE,i);
m3B[i] = iMA(NULL,0,m3,0,MODE_EMA,PRICE_CLOSE,i);
}return(0);}
0006名無しさん@お金いっぱい。
垢版 |
2020/11/11(水) 19:13:25.85ID:1cnUpv3C0
//-[Do not use this EA with a live account.]-[Kashii.mq4]

extern int tp = 120; extern int sl = 100;
extern double lots = 0.01; extern int mn = 100;

double sp; bool spr = true;
int s,t,u,bar,toa,tob,toc,tod,tik,po,psi;

int init(){return(0);}

int start(){

s = 0; t = 0; u = 0; bar = 0; toa = 0; tob = 0; toc = 0; tod = 0; tik = -1; po = 0; psi = 0; psi = POS();

RefreshRates();

sp = MarketInfo(Symbol(),MODE_SPREAD); if (sp >= 2) spr = false; else spr = true;

Comment ("\n spread = ",sp," tp = ",tp," sl = ",sl," lots = ",lots," mn = ",mn);

toa = OrdersTotal();
for(s = toa - 1; 0 <= s; s--)
{
if (!OrderSelect(s, SELECT_BY_POS, MODE_TRADES))
if (OrderSymbol() == Symbol() && OrderMagicNumber() == mn)
{return(0);}}

if (spr == true && psi <= 0 && bar != Bars)
{
tik = OrderSend(Symbol(),OP_BUY,lots,Ask,20,Bid - (sl-sp) * Point,Bid + (tp + sp)*Point,"Kashii",mn,0,Aqua);
tik = OrderSend(Symbol(),OP_SELL,lots,Bid,20,Ask + (sl - sp) * Point,Ask - (tp + sp) * Point,"Kashii",mn,0,Tomato);
bar = Bars;}return(0);}

int POS(){tob = OrdersTotal();
for (t = tob - 1; 0 <= t; t--){
if (!OrderSelect(t, SELECT_BY_POS, MODE_TRADES)) break;
if (OrderMagicNumber() != mn || OrderSymbol() != Symbol()) continue;{
if (OrderType() == OP_BUY || OrderType() == OP_SELL) po++;}}return(po);}
0007名無しさん@お金いっぱい。
垢版 |
2020/11/11(水) 19:20:21.56ID:BbwkMHJU0
↑練習巡洋艦香椎 USD/JPY

ポジションが無ければ、買と売を両建てします
裁量でポチポチ押して利確して遊びます

m(__)mライブトレードでは使わないでください
0008名無しさん@お金いっぱい。
垢版 |
2020/11/11(水) 19:30:49.38ID:LuWd5In00
[練習巡洋艦香椎 USD/JPY]

sp = MarketInfo(Symbol(),MODE_SPREAD); if (sp >= 50) spr = false; else spr = true;

スプレッドの設定ですけど、業者によって変わりますね
FXDDの場合、ドル円 25〜30 くらいなので、sp >= 50 にして下さい
0018名無しさん@お金いっぱい。
垢版 |
2020/11/11(水) 20:44:27.74ID:O9sRzC2A0
FXDD
USD/XMN 米ドル/メキシコペソ Spread 50.0 Swap short 16.6172
エキゾチック通貨 売でスワップが付く

結構動くのでスキャの練習にいいですよ
0019名無しさん@お金いっぱい。
垢版 |
2020/11/11(水) 21:19:35.64ID:fufqjj8b0
//-[Super Visor]

double SUV()
{
if (MA() > 0 && CA() > 0 && RSI() > 0) return(sa);
else if (MA() < 0 && CA() > 0 && RSI() < 0) return(sb);
else return(0);
}

double MA()
{
double a1 = iMA(NULL,0,10,0,MODE_EMA,0,0);
double a2 = iMA(NULL,0,30,0,MODE_EMA,0,0);
if (a1 >= a2) return( 1);
else if (a1 <= a2) return(-1);
else return(0);
}

double CA()
{
double c1 = iClose(NULL,NULL,0);
double c2 = iClose(NULL,NULL,1);
if (c1 >= (c2 + 0.00002)) return( 1);
else if (c1 <= (c2 - 0.00002)) return(-1);
else return(0);
}

double RSI()
{
double R1 = iRSI(NULL,0,14,0,1);
if (R1 > 55) return( 1);
else if (R1 < 45) return(-1);
else return(0);
}


練習巡洋艦 鹿島 USD/XMN
Super visor 監督者

条件厳しくすると取引しなくなる
0021名無しさん@お金いっぱい。
垢版 |
2020/11/11(水) 23:08:42.51ID:94Lgb2sK0
明日 練習巡洋艦 鹿島 USD/XMN のバックテストを貼ります
Spread = 500 なので、右上がりにするのは難しいべ
0022名無しさん@お金いっぱい。
垢版 |
2020/11/12(木) 06:59:54.32ID:8oooOm2C0
//-[Do not use this EA with a live account.]-[Kashima.mq4 FXDD USD/MXN M1]

extern bool buy = true; extern bool sell = true; extern bool reverse = false;
extern int tp = 3000; extern int sl = 3000;
extern double lots = 0.01; extern int mn = 101;

bool tim = true; bool spr = true; bool mod = true;
int tik,po,psi,supv,sa,sb,tod,u,toa,tob,toc,t,s,sp,bar,ma,ca,rsi;

int init(){return(0);}

int start(){

s = 0;t = 0;u = 0;po = 0;spr = 0;bar = 0;toa = 0;tob = 0;toc = 0;tod = 0;
psi = 0;supv = 0;tik = -1;
psi = PS();ma = MA();rsi = RSI();ca = CA();supv = SV();

if(reverse == true){sa = -1; sb = 1; }else {sa = 1; sb = -1;}

RefreshRates();

sp = MarketInfo(Symbol(),MODE_SPREAD); if (sp >= 800) spr = false; else spr = true;

Comment ("\n"," Spread= ",sp,
"\n"," buy= ",buy," sell= ",sell," reverse= ",reverse,
"\n"," tp= ",tp," sl= ",sl," lots= ",lots," mn= ",mn,
"\n"," MA= ",ma," CA= ",ca," RSI= ",rsi," SV= ",supv);

toa = OrdersTotal();
for(s = toa - 1; 0 <= s; s--)
{
if (!OrderSelect(s, SELECT_BY_POS, MODE_TRADES))
if (OrderSymbol() == Symbol() && OrderMagicNumber() == mn)
{
return(0);
}}

if (tim == true && spr == true && buy == true && psi <= 0 && supv > 0 && bar != Bars)
{
tik = OrderSend(Symbol(),OP_BUY,lots,Ask,10,Bid - (sl - sp) * Point,Bid + (tp + sp) * Point,"Kashima",mn,0,Aqua);
bar = Bars;
}

if (tim == true && spr == true && sell == true && psi <= 0 && supv < 0 && bar != Bars)
{
tik = OrderSend(Symbol(),OP_SELL,lots,Bid,10,Ask + (sl - sp) * Point,Ask - (tp + sp) * Point,"Kashima",mn,0,Tomato);
bar = Bars;
}

return(0);}
0023名無しさん@お金いっぱい。
垢版 |
2020/11/12(木) 07:01:08.88ID:4ITt0Gpg0
int PS()
{
tob = OrdersTotal();
for (t = tob - 1; 0 <= t; t--)
{
if (!OrderSelect(t, SELECT_BY_POS, MODE_TRADES)) break;
if (OrderMagicNumber() != mn || OrderSymbol() != Symbol()) continue;
{
if(OrderType() == OP_BUY || OrderType() == OP_SELL) po++;
}}
return(po);
}

double SV()
{
if (MA() > 0 && CA() > 0 && RSI() > 0) return(sa);
else if (MA() < 0 && CA() > 0 && RSI() < 0) return(sb);
else return(0);
}

double MA()
{
double a1 = iMA(NULL,0,10,0,MODE_EMA,0,0);
double a2 = iMA(NULL,0,20,0,MODE_EMA,0,0);
double a3 = iMA(NULL,0,50,0,MODE_EMA,0,0);
if (a1 >= a2 && a2 >= a3) return( 1);
else if (a1 <= a2 && a2 <= a3) return(-1);
else return(0);
}

double CA()
{
double c1 = iClose(NULL,NULL,0);
double c2 = iClose(NULL,NULL,1);
if (c1 >= (c2 + 0.00002)) return( 1);
else if (c1 <= (c2 - 0.00002)) return(-1);
else return(0);
}

double RSI()
{
double R1 = iRSI(NULL,0,14,0,1);
if (R1 > 55) return( 1);
else if (R1 < 45) return(-1);
else return(0);
}
0024名無しさん@お金いっぱい。
垢版 |
2020/11/12(木) 07:13:58.42ID:yUz3yWcN0
練習巡洋艦 鹿島 USD/XMN
スキャは1分足、スイングは5分〜日足 (要最適化)

とりま裁量でポチポチしてつかってください

m(__)mライブトレードでは使わないでください
0026名無しさん@お金いっぱい。
垢版 |
2020/11/12(木) 08:40:35.90ID:0ebL1Y170
練習巡洋艦 鹿島 USD/XMN バックテスト

Spread= 50 TP =100 SL = 1000

右上がりにできました
しかし、カーブフィッテイング、Spread= 2 ならきれいな右上がりなのですけど

ポジって逆行したらバシバシ損切る、利食いは損切りの10倍

https://i.imgur.com/QCIpjQM.jpg
0027名無しさん@お金いっぱい。
垢版 |
2020/11/12(木) 09:33:41.15ID:eRwjhHV80
○ Spread= 50 TP = 500〜1000 SL = 100

TPは、SLの5倍〜10倍。 SL値は入力できる最小値

某トレーダー様が、オーバーシュートを拾って逆行したら5銭で損切ると言ってたのがヒント。
0028名無しさん@お金いっぱい。
垢版 |
2020/11/12(木) 15:50:18.38ID:pMH0yOWJ0
FXDD 追証なしのゼロカットシステムではない
スイスフランショック時、ゼロカットが追いつかず、顧客に多額の借金を追わせた
0029名無しさん@お金いっぱい。
垢版 |
2020/11/12(木) 17:44:03.48ID:EMZEPxCv0
対円通貨はやめとけ業者、ファンドのカモにされる。
0030名無しさん@お金いっぱい。
垢版 |
2020/11/12(木) 21:46:37.08ID:H62Uqld50
USD/XMN
ヒロセでポチってみてるんだけど、レバ1 1万通貨で上手く波に乗ると500円玉単位で稼げるよ。
売りでスワップだから、高値迄きたら売りで入る感じ。順張りで売りやってればいいかも。
0031名無しさん@お金いっぱい。
垢版 |
2020/11/13(金) 08:02:44.91ID:Gk4SmnYx0
//-[HighLowBands.mq4]

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Aqua
#property indicator_color2 Violet

extern int LookBackPeriod =20;

double UBBuffer[];
double LBBuffer[];

int init(){

IndicatorBuffers(2);
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,UBBuffer);

SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(1,LBBuffer);

return(0);}

int start(){

int counted_bars=IndicatorCounted();
int i;

if(Bars<=LookBackPeriod) return(0);

if(counted_bars<1)
for(i=1;i<=LookBackPeriod;i++)
{
UBBuffer[Bars-i]=EMPTY_VALUE;
LBBuffer[Bars-i]=EMPTY_VALUE;
}

int limit=Bars-counted_bars;
if(counted_bars>0) limit++;

i=Bars-LookBackPeriod+1;

if(counted_bars>LookBackPeriod-1) i=Bars-counted_bars-1;

while(i>=0)
{
UBBuffer[i]=High[Highest(NULL,0,MODE_HIGH,LookBackPeriod,i)];
LBBuffer[i]=Low[Lowest(NULL,0,MODE_LOW,LookBackPeriod,i)];i--;
}
return(0);}


メガ倉庫のやつですエラー修正しときました。動作ok
0032名無しさん@お金いっぱい。
垢版 |
2020/11/13(金) 08:36:57.87ID:+IO/IZ7w0
MXN/JPY - メキシコペソ 日本円 5.098円
6円として1万通貨で6万円でレバ1

対ドルは5桁で動きが良い
USD/MXN
ヒロセ口座に12万円入金、一万通貨でぽちってます。
0033名無しさん@お金いっぱい。
垢版 |
2020/11/13(金) 09:13:04.55ID:LWtN5UUC0
エキゾチック通貨でなぜメキシコペソいいのか
メキシコ原油が良いらしいんです

米大統領選挙が不正疑惑でもめてるので注意ですけど
いまのとこペソ高に動いてます
0034名無しさん@お金いっぱい。
垢版 |
2020/11/13(金) 09:37:02.24ID:7Jb/d95V0
Friday the 13th
0035名無しさん@お金いっぱい。
垢版 |
2020/11/13(金) 11:05:08.05ID:sIkNfUW/0
私はバックテストの結果はあまり重要ではないとおもう、だから、一ヶ月で十分。
OpenChartで動作してればいいので、あとはフォワードで試行錯誤で最適化。
0036名無しさん@お金いっぱい。
垢版 |
2020/11/13(金) 15:56:13.96ID:qPdkZ32C0
USD/MXN [月足]

7/2007 9.99 4/2020 25.77
25.77 − 9.99 = 15.78
15.78 ÷ 2 = 7.89
9.99 + 7.89 = 17.88

コロナショックの前18.80に値が戻るかな
0037名無しさん@お金いっぱい。
垢版 |
2020/11/13(金) 16:12:28.02ID:LJW/FP3r0
USD/MXN
この通貨ペアは、買で入って捕まるとマイナススワップが付くから注意。
○○ショックがまたきたらペソ安になると予想。
だから、デイ、スイングくらいがいい。
0038名無しさん@お金いっぱい。
垢版 |
2020/11/13(金) 17:28:38.74ID:g28zl3kJ0
DQX タダでこんなに遊べていいの 無料体験版配信中
https://www.dqx.jp/trial/
0039名無しさん@お金いっぱい。
垢版 |
2020/11/13(金) 19:51:11.44ID:DvIbWO3I0
RSI (相対力指数)

計算式
n = 14
RS = (n日間の終値の上昇幅の平均) ÷ (n日間の終値の下落幅の平均)
RSI = 100 - (100 ÷ (RS + 1))

[RSI Dots]
extern int RSIPeriod = 12;

n = 12になってますね、基本は n = 14 らしいですけど動きはいいのでこれもあり。
0040名無しさん@お金いっぱい。
垢版 |
2020/11/13(金) 22:01:38.02ID:/qq1IReh0
スウォッチの自動巻き
https://i.imgur.com/DLCu36o.jpg

まだ、作ってたんだね、古い自動巻き一個持ってるよ、勿体無くてあまり使ってない。
このメタルボディのがカッコいいんだよ、スイス製の自動巻きが3万だからいいよね。
新型のは、内部のメカがたしかカシメてて分解不能だったとおもう。
0042名無しさん@お金いっぱい。
垢版 |
2020/11/13(金) 23:04:39.43ID:reL7sw540
USD/MXN
全ポジションクローズSQ完了、今週も、おつかれさまでした。
なんとかプラスで抜けました。
0043名無しさん@お金いっぱい。
垢版 |
2020/11/14(土) 11:30:30.79ID:lzybkOkq0
//-[Close ALL]

input int MaxSlippage = 5;

int OnInit(){

ObjectCreate(0,"CloseButton",OBJ_BUTTON,0,0,0);
ObjectSetInteger(0,"CloseButton",OBJPROP_XDISTANCE,20);
ObjectSetInteger(0,"CloseButton",OBJPROP_YDISTANCE,300);
ObjectSetInteger(0,"CloseButton",OBJPROP_XSIZE,100);
ObjectSetInteger(0,"CloseButton",OBJPROP_YSIZE,50);
ObjectSetString(0,"CloseButton",OBJPROP_TEXT,"Close All");

ObjectSetInteger(0,"CloseButton",OBJPROP_COLOR,Blue);
ObjectSetInteger(0,"CloseButton",OBJPROP_BGCOLOR,Aqua);
ObjectSetInteger(0,"CloseButton",OBJPROP_BORDER_COLOR,Blue);
ObjectSetInteger(0,"CloseButton",OBJPROP_BORDER_TYPE,BORDER_FLAT);
ObjectSetInteger(0,"CloseButton",OBJPROP_BACK,false);
ObjectSetInteger(0,"CloseButton",OBJPROP_HIDDEN,true);
ObjectSetInteger(0,"CloseButton",OBJPROP_STATE,false);
ObjectSetInteger(0,"CloseButton",OBJPROP_FONTSIZE,12);

return(INIT_SUCCEEDED);}

void OnDeinit(const int reason){

ObjectDelete(0,"CloseButton");}

void OnTick(){}

void OnChartEvent(const int id,const long &lparam,const double &dparam,const string &sparam){

if(sparam == "CloseButton"){
CloseAllOpenPositions(MaxSlippage);
ObjectSetInteger(0,"CloseButton",OBJPROP_STATE,false);}}

void CloseAllOpenPositions(int intMaxSlippage){

bool checkOrderClose = true;
int index = OrdersTotal()-1;

while (index >=0 && OrderSelect (index,SELECT_BY_POS,MODE_TRADES)==true){

if (OrderType()==OP_BUY || OrderType()==OP_SELL){
checkOrderClose = OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),MaxSlippage,CLR_NONE);

if(checkOrderClose == false){
int errorCode = GetLastError();

if (errorCode == 1 || errorCode == 2 || errorCode == 5 || errorCode == 6 || errorCode == 64 ||
errorCode == 65 || errorCode == 132 || errorCode == 133 || errorCode == 139) break;
else continue;}}index--;}}
0046名無しさん@お金いっぱい。
垢版 |
2020/11/14(土) 19:56:02.68ID:36pJmz/N0
//-[Do not use this EA with a live account.]-[Dart Monkey Martingale.mq4 USD/MXN]

extern int tp = 500; extern int sl = 50; extern int mn = 105;
extern double blots = 0.01; extern double bairitu = 2; extern int max = 2;

int tik,rv; double lots;

int OnInit(){return(INIT_SUCCEEDED);}

void OnDeinit(const int reason){}

void Kessai()
{
for(int i=0; i<OrdersTotal(); i++)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false) break;
if(OrderType()==OP_BUY) rv = OrderClose(OrderTicket(),OrderLots(),Bid,3,Orange);
if(OrderType()==OP_SELL) rv = OrderClose(OrderTicket(),OrderLots(),Ask,3,Orange);
break;}}

double martine()
{
int renpai=0;

for(int i= OrdersHistoryTotal()-1; i>=0; i--)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)==true)
{
if(OrderMagicNumber()==mn && OrderSymbol()==Symbol())
{
if(OrderProfit()<=0)renpai++;
else if(OrderProfit()>0)break;}}}

if(renpai>=max)renpai=max;
lots= blots*MathPow(bairitu,renpai);
return(lots);
}
void OnTick()
{
lots = martine();
int ent =MathRand() %2;
if(OrdersTotal()==0 && ent==0)
{
tik = OrderSend(Symbol(),OP_BUY,lots,Ask,20,Ask-(sl*Point),Ask+(tp*Point),"",mn,0,Blue);
}
if(OrdersTotal()==0 && ent==1)
{
tik = OrderSend(Symbol(),OP_SELL,lots,Bid,20,Bid+(sl*Point),Bid-(tp*Point),"",mn,0,Red);
}
}
0049名無しさん@お金いっぱい。
垢版 |
2020/11/14(土) 22:41:20.72ID:q7eLbBS70
バックテスト
Expert Advisor Dart Monkey Martingale.ex4

USD/MXN
From 2020.10.13 To 2020.11.13
Period M1 Spread 50

tp=1000 sl=100 blot=0.01 bairitu=2 max=2

https://i.imgur.com/uHb6gLq.jpg
0051名無しさん@お金いっぱい。
垢版 |
2020/11/15(日) 06:37:27.56ID:4ivHspFN0
Thank you.
Make a trend-following swing with EMA and candles.

Optimization is fixed at sl = 100 and tp should be changed from 300 to 1000.
Loss cut 1 Profit is about 5-10.
0052名無しさん@お金いっぱい。
垢版 |
2020/11/15(日) 08:36:28.17ID:34qrmOuS0
//-[Do not use this EA with a live account.]-[EMA candle RSI Martingale.mq4 USD/MXN]

extern int tp = 500; extern int sl = 100; extern int mn = 105;
extern double blots = 0.01; extern double bairitu = 2; extern int max = 2;

int tik,rv; double lots;

int OnInit(){return(INIT_SUCCEEDED);}

void OnDeinit(const int reason){}

void Kessai()
{
for(int i=0; i<OrdersTotal(); i++)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false) break;
if(OrderType()==OP_BUY) rv = OrderClose(OrderTicket(),OrderLots(),Bid,3,Orange);
if(OrderType()==OP_SELL) rv = OrderClose(OrderTicket(),OrderLots(),Ask,3,Orange);
break;}}

double martine()
{
int renpai=0;

for(int i= OrdersHistoryTotal()-1; i>=0; i--)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)==true)
{
if(OrderMagicNumber()==mn && OrderSymbol()==Symbol())
{
if(OrderProfit()<=0)renpai++;
else if(OrderProfit()>0)break;}}}

if(renpai>=max)renpai=max;
lots= blots*MathPow(bairitu,renpai);
return(lots);
}
void OnTick()
{
lots = martine();

if(OrdersTotal()==0 && SV()==1)
{
tik = OrderSend(Symbol(),OP_BUY,lots,Ask,20,Ask-(sl*Point),Ask+(tp*Point),"",mn,0,Blue);
}
if(OrdersTotal()==0 && SV()==-1)
{
tik = OrderSend(Symbol(),OP_SELL,lots,Bid,20,Bid+(sl*Point),Bid-(tp*Point),"",mn,0,Red);
}
}
0053名無しさん@お金いっぱい。
垢版 |
2020/11/15(日) 08:37:44.66ID:raYv4cbt0
double SV()
{
if (MA() > 0 && CA() > 0 && RSI() > 0) return( 1);
else if (MA() < 0 && CA() > 0 && RSI() < 0) return(-1);
else return(0);
}

double MA()
{
double a1 = iMA(NULL,0,10,0,MODE_EMA,0,0);
double a2 = iMA(NULL,0,20,0,MODE_EMA,0,0);
double a3 = iMA(NULL,0,100,0,MODE_EMA,0,0);
if (a1 >= a2 && a2 >= a3) return( 1);
else if (a1 <= a2 && a2 <= a3) return(-1);
else return(0);
}

double CA()
{
double c1 = iClose(NULL,NULL,0);
double c2 = iClose(NULL,NULL,1);
if (c1 >= (c2 + 0.00050)) return( 1);
else if (c1 <= (c2 - 0.00050)) return(-1);
else return(0);
}

double RSI()
{
double R1 = iRSI(NULL,0,12,0,1);
if (R1 > 70) return( 1);
else if (R1 < 30) return(-1);
else return(0);
}
0054名無しさん@お金いっぱい。
垢版 |
2020/11/15(日) 08:42:47.45ID:JeV2/JRD0
猿ダーツより性能が落ちるとは.。orz
0059名無しさん@お金いっぱい。
垢版 |
2020/11/15(日) 15:37:13.52ID:saCgadkW0
//-[Rainbow color.mq4]

#property indicator_chart_window
#property indicator_buffers 7

#property indicator_color1 BlueViolet
#property indicator_width1 1
#property indicator_style1 STYLE_SOLID

#property indicator_color2 SkyBlue
#property indicator_width2 1
#property indicator_style2 STYLE_SOLID

#property indicator_color3 LimeGreen
#property indicator_width3 1
#property indicator_style3 STYLE_SOLID

#property indicator_color4 Gold
#property indicator_width4 1
#property indicator_style4 STYLE_SOLID

#property indicator_color5 Coral
#property indicator_width5 1
#property indicator_style5 STYLE_SOLID

#property indicator_color6 Crimson
#property indicator_width6 1
#property indicator_style6 STYLE_SOLID

#property indicator_color7 Magenta
#property indicator_width7 1
#property indicator_style7 STYLE_SOLID

extern int m1 = 5;
extern int m2 = 10;
extern int m3 = 20;
extern int m4 = 35;
extern int m5 = 50;
extern int m6 = 75;
extern int m7 = 100;

double m1B[];
double m2B[];
double m3B[];
double m4B[];
double m5B[];
double m6B[];
double m7B[];

int init(){

SetIndexBuffer(0,m1B);
SetIndexStyle(0, DRAW_LINE, STYLE_SOLID, 1, BlueViolet);
SetIndexDrawBegin(0, m1-1);
0060名無しさん@お金いっぱい。
垢版 |
2020/11/15(日) 15:39:06.90ID:ps2QnGeK0
SetIndexLabel(0,"M1");

SetIndexBuffer(1,m2B);
SetIndexStyle(1, DRAW_LINE, STYLE_SOLID, 1, SkyBlue);
SetIndexDrawBegin(1,m2-1);
SetIndexLabel(1,"M2");

SetIndexBuffer(2,m3B);
SetIndexStyle(2, DRAW_LINE, STYLE_SOLID, 1, LimeGreen);
SetIndexDrawBegin(2,m3-1);
SetIndexLabel(2,"M3");

SetIndexBuffer(3,m4B);
SetIndexStyle(3, DRAW_LINE, STYLE_SOLID, 1, Gold);
SetIndexDrawBegin(3,m4-1);
SetIndexLabel(3,"M4");

SetIndexBuffer(4,m5B);
SetIndexStyle(4, DRAW_LINE, STYLE_SOLID, 1, Coral);
SetIndexDrawBegin(4,m5-1);
SetIndexLabel(4,"M5");

SetIndexBuffer(5,m6B);
SetIndexStyle(5, DRAW_LINE, STYLE_SOLID, 1, Crimson);
SetIndexDrawBegin(5,m6-1);
SetIndexLabel(5,"M6");

SetIndexBuffer(6,m7B);
SetIndexStyle(6, DRAW_LINE, STYLE_SOLID, 1, Magenta);
SetIndexDrawBegin(6,m7-1);
SetIndexLabel(6,"M7");

return(0);}

int deinit(){

return(0);}

int start(){

int i, limit = Bars-IndicatorCounted();

for(i=limit-1; i>=0; i--){

m1B[i] = iMA(NULL,0,m1,0,MODE_EMA,PRICE_CLOSE,i);
m2B[i] = iMA(NULL,0,m2,0,MODE_EMA,PRICE_CLOSE,i);
m3B[i] = iMA(NULL,0,m3,0,MODE_EMA,PRICE_CLOSE,i);
m4B[i] = iMA(NULL,0,m4,0,MODE_EMA,PRICE_CLOSE,i);
m5B[i] = iMA(NULL,0,m5,0,MODE_EMA,PRICE_CLOSE,i);
m6B[i] = iMA(NULL,0,m6,0,MODE_EMA,PRICE_CLOSE,i);
m7B[i] = iMA(NULL,0,m7,0,MODE_EMA,PRICE_CLOSE,i);

}return(0);}
0061名無しさん@お金いっぱい。
垢版 |
2020/11/15(日) 15:41:24.42ID:jGm/VbpM0
double SV()
{
if (SG() > 0) return( 1);
else if (SG() < 0) return(-1);
else return(0);}

double SG()
{
double a1 = iMA(NULL,0, 5,0,MODE_EMA,0,1);
double a2 = iMA(NULL,0,10,0,MODE_EMA,0,1);
double a3 = iMA(NULL,0,15,0,MODE_EMA,0,1);
double a4 = iMA(NULL,0,20,0,MODE_EMA,0,1);
double a5 = iMA(NULL,0,25,0,MODE_EMA,0,1);
double a6 = iMA(NULL,0,30,0,MODE_EMA,0,1);
double a7 = iMA(NULL,0,35,0,MODE_EMA,0,1);
double r1 = iRSI(NULL, 0, 14, 0, 1);
if (a1 > a2 && a2 > a3 && a3 > a4 && a4 > a5 &&
a5 > a6 && a6 > a7 && r1 > 60) return( 1);
else if (a1 < a2 && a2 < a3 && a3 < a4 && a4 < a5 &&
a5 < a6 && a6 < a7 && r1 < 40) return(-1);
else return(0);}
0064名無しさん@お金いっぱい。
垢版 |
2020/11/15(日) 18:08:19.10ID:eAy9I4nk0
//-[Rainbow trend-following]

double SV()
{
double a1 = iMA(NULL,0, 5,0,MODE_EMA,0,1);
double a2 = iMA(NULL,0,10,0,MODE_EMA,0,1);
double a3 = iMA(NULL,0,15,0,MODE_EMA,0,1);
double a4 = iMA(NULL,0,20,0,MODE_EMA,0,1);
double a5 = iMA(NULL,0,25,0,MODE_EMA,0,1);
double a6 = iMA(NULL,0,30,0,MODE_EMA,0,1);
double a7 = iMA(NULL,0,35,0,MODE_EMA,0,1);
double c1 = iClose(NULL,NULL,0);
double c2 = iClose(NULL,NULL,1);
double r1 = iRSI(NULL, 0, 12, 0, 1);
if (a1 > a2 && a2 > a3 && a3 > a4 && a4 > a5 && a5 > a6 &&
a6 > a7 && c1 >= (c2 + 0.00002) && r1 > 70) return( 1);
else if (a1 < a2 && a2 < a3 && a3 < a4 && a4 < a5 && a5 < a6 &&
a6 < a7 &&c1 <= (c2 - 0.00002) && r1 < 30) return(-1);
else return(0);}
0069名無しさん@お金いっぱい。
垢版 |
2020/11/16(月) 08:13:26.92ID:eC+lN6Ha0
やはり、マーチンゲール、ナンピンはやる意味がないですね。
ロット上げればいいことだし。

>>65
虹色インジとRSI ドットも入れてます。
0071名無しさん@お金いっぱい。
垢版 |
2020/11/16(月) 08:38:27.08ID:RZwUu5wX0
sl = 5000 tp = 5000 でEAの動き見ながら裁量。
0072名無しさん@お金いっぱい。
垢版 |
2020/11/16(月) 09:08:27.23ID:xDXQPyy40
>>43 [Close All]

ObjectSetInteger(0,"CloseButton",OBJPROP_YDISTANCE,300);

300だとボタンの位置が下すぎなので100に修正

動作はOK
0073名無しさん@お金いっぱい。
垢版 |
2020/11/16(月) 10:17:02.23ID:qmaW6MKx0
[USD/MXN]

0.1Lotsだと+1000pointで+500円の利益になるので利確してよさそうです。

損切り値をOptimization(最適化)

Period M1 Spread 50 (500point) From 2020.10.16 To 2020.11.16 Start 100 Step 50 Stop 300
計算では sl = 150

tp = 1000 sl = 150 が最適
0074名無しさん@お金いっぱい。
垢版 |
2020/11/16(月) 10:39:43.53ID:laKEpGgc0
Spread = 500point ですから、250円、tp = 150、 75円、計325円をバシバシ損切りして、500円玉を得る。これは勝てませんねorz
裁量では勝てるので勝率をあげないといけません。
0075名無しさん@お金いっぱい。
垢版 |
2020/11/16(月) 11:52:07.72ID:WgH05qhG0
USD/MXN ヒロセで裁量
入金 150k 有効比率 240%(イエローでない状態)レバ0.5

1分足 20本中の一番高値にきたら売 100〜500円で利喰い
この通貨ペアは買で入ると-スワップが付くので微利でにげましょう
0076名無しさん@お金いっぱい。
垢版 |
2020/11/16(月) 17:31:40.33ID:t6JXv27J0
>>31 [HighLowBands.mq4]

UBBuffer[i]=High[Highest(NULL,0,MODE_HIGH,LookBackPeriod,i)];
LBBuffer[i]=Low[Lowest(NULL,0,MODE_LOW,LookBackPeriod,i)];i--;

修正
UBBuffer[i]=High[iHighest(NULL,0,MODE_HIGH,LookBackPeriod,i)];
LBBuffer[i]=Low[iLowest(NULL,0,MODE_LOW,LookBackPeriod,i)];i--;


↓EA

//-[HL Band]
double SV()
{
if(Close[0] >= High[iHighest(NULL,0,MODE_HIGH,20,1)]) return( 1);
else if(Close[0] <= Low[iLowest (NULL,0, MODE_LOW,20,1)]) return(-1);
else return(0);}
0078名無しさん@お金いっぱい。
垢版 |
2020/11/16(月) 18:45:17.76ID:EM7EZR1E0
ドル安メキシコペソ高、ドル売りのようです。
珈琲は各自淹れてくださいませm(__)m
0079名無しさん@お金いっぱい。
垢版 |
2020/11/16(月) 19:25:05.29ID:nubQc7Mp0
>>22-23 鹿島にHL-Bands を搭載

reverse = true;

//-[HL Band]
double SV()
{
if(Close[0] >= High[iHighest(NULL,0,MODE_HIGH,20,1)]) return(sa);
else if(Close[0] <= Low[iLowest (NULL,0, MODE_LOW,20,1)]) return(sb);
else return(0);}

逆張り、売り専用なら

extern bool buy = false; extern bool sell = true; extern bool reverse = true;

true トゥルー ON 真の false フォールス OFF 偽 (ぎ)
0080名無しさん@お金いっぱい。
垢版 |
2020/11/16(月) 20:21:21.55ID:JXGoqbxh0
HL Bands 連勝中

逆張りはトレンドに弱いから、チャート見てるときは大丈夫ですけど
順張りでトレンドに乗ると1000pointづつ儲かる
こういう、単純なのがいいのかな

https://i.imgur.com/i6ssT7p.jpg

RSIは使ってないです
0081名無しさん@お金いっぱい。
垢版 |
2020/11/16(月) 21:22:54.13ID:MkbTjqg/0
HL Bandsは、レンジでは逆張り、トレンドでは順張りにすると稼げる。
つまり、レンジかトレンドか判断して、順張り、逆張り、を切り替えればいい。
0083名無しさん@お金いっぱい。
垢版 |
2020/11/16(月) 22:52:48.12ID:rd1g7TiF0
トレンド転換 ggったらRCI

時間と価格から優先度をあらわしたインジケーターで、 トレンド転換判断に便利です。
一般的には、0.8のボーダーから内に入ったときが反転目安に使われています。

最適化の sl = 150 も良い数字ではある
0085名無しさん@お金いっぱい。
垢版 |
2020/11/16(月) 23:50:21.91ID:B6oshQ/g0
MAでトレンド判断すればって考えると、それならMAのシグナルでいいってなる
だましもあるから損切りが多くなる 初心者には無理
0088名無しさん@お金いっぱい。
垢版 |
2020/11/17(火) 08:31:40.40ID:GQzo77LD0
HL Bands
15分足 順張りでブレークアウト スイングで良さそうですよ。

逆張りの場合は1分足 スキャル 裁量。
0091名無しさん@お金いっぱい。
垢版 |
2020/11/17(火) 12:48:45.09ID:kHhP+8wm0
ドル円乱降下注意

大統領選挙も決着つかないようだし荒れそう
トランプ氏、イラン攻撃を検討か 米報道
ドル売り、メキシコペソ高かな
0094名無しさん@お金いっぱい。
垢版 |
2020/11/17(火) 20:50:44.80ID:SHlaobgQ0
MACD+Stochasticってどうなんだろ、倉庫見てくるべ。
0095名無しさん@お金いっぱい。
垢版 |
2020/11/17(火) 21:23:59.82ID:Gcv89j840
double SV()
{
double M1 = iMACD(NULL,0,12,26,9,0,0,0);
double M2 = iMACD(NULL,0,12,26,9,0,0,1);
double S1 = iMACD(NULL,0,12,26,9,0,1,0);
double S2 = iMACD(NULL,0,12,26,9,0,1,1);
double K1 = iStochastic(NULL,0,5,3,1,0,0,0,0);
double K2 = iStochastic(NULL,0,5,3,1,0,0,0,1);
double D1 = iStochastic(NULL,0,5,3,1,0,0,1,0);
double D2 = iStochastic(NULL,0,5,3,1,0,0,1,1);
if(M2 <= S2 && M1 > S1 && K2 <= D2 && K1 > D1) return(sa);
else if(M2 >= S2 && M1 < S1 && K2 >= D2 && K1 < D1) return(sb);
else return(0);}

できたよ 動作ok
0097名無しさん@お金いっぱい。
垢版 |
2020/11/18(水) 08:48:42.95ID:hM77N9vx0
[USD/MXN]
ダマシ回避でEMAとCandleを追加してみた。

double SV()
{
double m1 = iMACD(NULL,0,12,26,9,0,0,0);
double m2 = iMACD(NULL,0,12,26,9,0,0,1);
double s1 = iMACD(NULL,0,12,26,9,0,1,0);
double s2 = iMACD(NULL,0,12,26,9,0,1,1);
double k1 = iStochastic(NULL,0,5,3,1,0,0,0,0);
double k2 = iStochastic(NULL,0,5,3,1,0,0,0,1);
double d1 = iStochastic(NULL,0,5,3,1,0,0,1,0);
double d2 = iStochastic(NULL,0,5,3,1,0,0,1,1);
double a1 = iMA(NULL,0,10,0,MODE_EMA,0,1);
double a2 = iMA(NULL,0,20,0,MODE_EMA,0,1);
double c1 = iClose(NULL,NULL,0);
double c2 = iClose(NULL,NULL,1);
if(m2 <= s2 && m1 > s1 && k2 <= d2 && k1 > d1 && a1 > a2 && c1 >= (c2 + 0.00020)) return(sa);
else if(m2 >= s2 && m1 < s1 && k2 >= d2 && k1 < d1 && a1 < a2 && c1 <= (c2 - 0.00020)) return(sb);
else return(0);}
0098名無しさん@お金いっぱい。
垢版 |
2020/11/18(水) 09:30:26.78ID:Evn2Vkcs0
Ballon Bleu De Cartier
https://i.imgur.com/rbzYFHh.jpg

こっちが自動巻きクオーツでも500k
0099名無しさん@お金いっぱい。
垢版 |
2020/11/18(水) 12:45:15.52ID:NQ6W1jSp0
投資家takuの動画見ろよ
0100名無しさん@お金いっぱい。
垢版 |
2020/11/18(水) 13:12:42.57ID:hiux+9vn0
>>99
ありがとう。でもtaku氏って医者じゃないのうちは時計屋だからね。あはは。

<<97条件絞ると売買しなくなるんだよ、この辺が限界かな。
Optimization Spread = 50 tp=1100 sl=100 くらい
■ このスレッドは過去ログ倉庫に格納されています

ニューススポーツなんでも実況