[MT4/5] Metatrader Cafe [初心者]
■ このスレッドは過去ログ倉庫に格納されています
//-[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行まで貼れるよ //-[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);} //-[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);} ↑練習巡洋艦香椎 USD/JPY
ポジションが無ければ、買と売を両建てします
裁量でポチポチ押して利確して遊びます
m(__)mライブトレードでは使わないでください [練習巡洋艦香椎 USD/JPY]
sp = MarketInfo(Symbol(),MODE_SPREAD); if (sp >= 50) spr = false; else spr = true;
スプレッドの設定ですけど、業者によって変わりますね
FXDDの場合、ドル円 25〜30 くらいなので、sp >= 50 にして下さい Artificial Intelligence - expert for MetaTrader 4
https://www.mql5.com/en/code/10281
Artificial Intelligence - expert for MetaTrader 5
https://www.mql5.com/en/code/1104 メタトレーダー4 (MT4)用 EA・インジケーター ダウンロード館
http://fx-mt4ea.com/ 練習巡洋艦 鹿島 USD/XMN
https://i.imgur.com/vTJi8jg.jpg
フォアードテスト中
EMA 10 20 50 、RSI 60 40 、ロウソクを使います forward testing
フォワードテストですよね FXDD
USD/XMN 米ドル/メキシコペソ Spread 50.0 Swap short 16.6172
エキゾチック通貨 売でスワップが付く
結構動くのでスキャの練習にいいですよ //-[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 監督者
条件厳しくすると取引しなくなる メガ(ファイル置き場)の管理者パスワードが凍結されたみたいなんですよ 明日 練習巡洋艦 鹿島 USD/XMN のバックテストを貼ります
Spread = 500 なので、右上がりにするのは難しいべ //-[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);} 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);
} 練習巡洋艦 鹿島 USD/XMN
スキャは1分足、スイングは5分〜日足 (要最適化)
とりま裁量でポチポチしてつかってください
m(__)mライブトレードでは使わないでください 練習巡洋艦 鹿島 USD/XMN バックテスト
Spread= 50 TP =100 SL = 1000
右上がりにできました
しかし、カーブフィッテイング、Spread= 2 ならきれいな右上がりなのですけど
ポジって逆行したらバシバシ損切る、利食いは損切りの10倍
https://i.imgur.com/QCIpjQM.jpg ○ Spread= 50 TP = 500〜1000 SL = 100
TPは、SLの5倍〜10倍。 SL値は入力できる最小値
某トレーダー様が、オーバーシュートを拾って逆行したら5銭で損切ると言ってたのがヒント。 FXDD 追証なしのゼロカットシステムではない
スイスフランショック時、ゼロカットが追いつかず、顧客に多額の借金を追わせた USD/XMN
ヒロセでポチってみてるんだけど、レバ1 1万通貨で上手く波に乗ると500円玉単位で稼げるよ。
売りでスワップだから、高値迄きたら売りで入る感じ。順張りで売りやってればいいかも。 //-[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 MXN/JPY - メキシコペソ 日本円 5.098円
6円として1万通貨で6万円でレバ1
対ドルは5桁で動きが良い
USD/MXN
ヒロセ口座に12万円入金、一万通貨でぽちってます。 エキゾチック通貨でなぜメキシコペソいいのか
メキシコ原油が良いらしいんです
米大統領選挙が不正疑惑でもめてるので注意ですけど
いまのとこペソ高に動いてます 私はバックテストの結果はあまり重要ではないとおもう、だから、一ヶ月で十分。
OpenChartで動作してればいいので、あとはフォワードで試行錯誤で最適化。 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に値が戻るかな USD/MXN
この通貨ペアは、買で入って捕まるとマイナススワップが付くから注意。
○○ショックがまたきたらペソ安になると予想。
だから、デイ、スイングくらいがいい。 DQX タダでこんなに遊べていいの 無料体験版配信中
https://www.dqx.jp/trial/ RSI (相対力指数)
計算式
n = 14
RS = (n日間の終値の上昇幅の平均) ÷ (n日間の終値の下落幅の平均)
RSI = 100 - (100 ÷ (RS + 1))
[RSI Dots]
extern int RSIPeriod = 12;
n = 12になってますね、基本は n = 14 らしいですけど動きはいいのでこれもあり。 スウォッチの自動巻き
https://i.imgur.com/DLCu36o.jpg
まだ、作ってたんだね、古い自動巻き一個持ってるよ、勿体無くてあまり使ってない。
このメタルボディのがカッコいいんだよ、スイス製の自動巻きが3万だからいいよね。
新型のは、内部のメカがたしかカシメてて分解不能だったとおもう。 USD/MXN
全ポジションクローズSQ完了、今週も、おつかれさまでした。
なんとかプラスで抜けました。 //-[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--;}} 1 Click Button To Close All Open Positions - MetaTrader 4
https://www.mql5.com/ja/code/14833
全決済ボタン、ソースがあると好きにいじれます。 SATURDAY MUSIC: Sweet November Jazz - Calm Background Music for Peace of Mind, Stress Relief, Relax
https://www.youtube.com/watch?v=q2kp6v0Gprc //-[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);
}
} MT4 EAの作り方 ランダムエントリーにマーチンゲール法を組み込む
http://fx.zeniken.net/?p=404#google_vignette
猿ダーツ(乱数)でエントリー負けたら倍
https://i.imgur.com/wWgbiYv.jpg
このEAをライブアカウントで使ってはいけません Paris Night Jazz - Smooth Saxophone JAZZ - Night Romantic JAZZ Music
https://www.youtube.com/watch?v=t5oRo6BMpf0 バックテスト
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 >>49
backtest looks promising but still need to watch out for the risk. 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. //-[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);
}
} 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);
} Starbucks Music Playlist 2020 - Best Coffee Shop Background Music
https://www.youtube.com/watch?v=23LJkiM_hlE
買い物行ってくるべ What is a mechanical watch? - Swatch SISTEM51 IRONY
https://www.youtube.com/watch?v=lPfcdkZ4CBM //-[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); 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);} 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);} BROTHER - By Rainbow On Trend High Extreme Results EA 5 minute manual system - MetaTrader 4
https://www.mql5.com/ja/code/8290 Sunday Morning Jazz - Positive Morning Bossa Nova & Jazz
https://www.youtube.com/watch?v=U5al6OkH57U //-[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);} Monday Jazz - Positive Morning Bossa Nova & Jazz Music
https://www.youtube.com/watch?v=pMXvEYz94wo やはり、マーチンゲール、ナンピンはやる意味がないですね。
ロット上げればいいことだし。
>>65
虹色インジとRSI ドットも入れてます。 sl = 5000 tp = 5000 でEAの動き見ながら裁量。 >>43 [Close All]
ObjectSetInteger(0,"CloseButton",OBJPROP_YDISTANCE,300);
↑
300だとボタンの位置が下すぎなので100に修正
動作はOK [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 が最適 Spread = 500point ですから、250円、tp = 150、 75円、計325円をバシバシ損切りして、500円玉を得る。これは勝てませんねorz
裁量では勝てるので勝率をあげないといけません。 USD/MXN ヒロセで裁量
入金 150k 有効比率 240%(イエローでない状態)レバ0.5
1分足 20本中の一番高値にきたら売 100〜500円で利喰い
この通貨ペアは買で入ると-スワップが付くので微利でにげましょう >>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);} Happy November Jazz - Sweet Jazz and Bossa Nova
https://www.youtube.com/watch?v=Hkvmu3TjUrg ドル安メキシコペソ高、ドル売りのようです。
珈琲は各自淹れてくださいませm(__)m >>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 偽 (ぎ) HL Bands 連勝中
逆張りはトレンドに弱いから、チャート見てるときは大丈夫ですけど
順張りでトレンドに乗ると1000pointづつ儲かる
こういう、単純なのがいいのかな
https://i.imgur.com/i6ssT7p.jpg
RSIは使ってないです HL Bandsは、レンジでは逆張り、トレンドでは順張りにすると稼げる。
つまり、レンジかトレンドか判断して、順張り、逆張り、を切り替えればいい。 Hバンドに当たって大暴落って良くあるパターンだし単純にsl = ∞ じゃダメそう。 トレンド転換 ggったらRCI
時間と価格から優先度をあらわしたインジケーターで、 トレンド転換判断に便利です。
一般的には、0.8のボーダーから内に入ったときが反転目安に使われています。
最適化の sl = 150 も良い数字ではある RCI_3Line_v130
https://fx-chart.info/rci_3line_v130/
カスタムインジケータになってくるとめんどうですね
VQみたいなやつとか
バックテストできないんだっけ MAでトレンド判断すればって考えると、それならMAのシグナルでいいってなる
だましもあるから損切りが多くなる 初心者には無理 TUESDAY MUSIC: Positive Mood Jazz - Coffee Time Jazz & Bossa Nova
https://www.youtube.com/watch?v=8dJQlspjY94 SEIKO 5 自動巻き
https://i.imgur.com/Yvuz2YX.jpg
これドンキで25kで売ってた
ナイロンベルトに交換すればよさそう HL Bands
15分足 順張りでブレークアウト スイングで良さそうですよ。
逆張りの場合は1分足 スキャル 裁量。 ドル円乱降下注意
大統領選挙も決着つかないようだし荒れそう
トランプ氏、イラン攻撃を検討か 米報道
ドル売り、メキシコペソ高かな TUESDAY MUSIC: Positive Mood Jazz - Coffee Time Jazz & Bossa Nova
https://www.youtube.com/watch?v=8dJQlspjY94 MACD+Stochasticってどうなんだろ、倉庫見てくるべ。 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 WEDNESDAY MUSIC: Cheerful Positive Jazz - Morning Coffee Jazz & Bossa Nova
https://www.youtube.com/watch?v=yVjaaM4R5XM [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);} Ballon Bleu De Cartier
https://i.imgur.com/rbzYFHh.jpg
こっちが自動巻きクオーツでも500k >>99
ありがとう。でもtaku氏って医者じゃないのうちは時計屋だからね。あはは。
<<97条件絞ると売買しなくなるんだよ、この辺が限界かな。
Optimization Spread = 50 tp=1100 sl=100 くらい ■ このスレッドは過去ログ倉庫に格納されています