こんにちは。
この(素晴らしい)フォーラムのツールやソムの戦略のいくつかを見て、studyhaving長い間見て、それはインディケータCCIはしばしば信頼性の高いフィルタのように使用されていることを私に見えた。
参考マーク。 +100/-100と0は重要です。 しかし、あまり深く考える前に、まず基準マーク0から考えてみましょう。
この基準マーク0を割ると同時に、相場は義務的に同じ方向に進みます。
では、この単純な値からEA(MT3またはMT4用)を作ることは可能でしょうか?
インジケータ:
CCI (10 or 14 ) (期間を変更することができます)
FT:M30またはH1
SL: 20 (外部)
TP:200(外部)
TP:6(外部)
ルールオープン:基準マーク0を抜けたところ
クローズ:SL、またはTP、またはTS、または新しいクロスが基準マーク0から持ち越された場合。
まずはシンプルに、最初の結果に従って、フィルターをかけてみましょう。
この方法は、リスクとピップの最大値を取るのではなく、信頼性が高く有利な小さな取引自体を毎回確保することを目的としています。
このリクエストに関心を寄せていただき、ありがとうございますBruno,
CCIが0を越えて上昇している場合、それは購入するための信号であることを意味します。そうなんですか?
CCIが下降トレンドにあり、0を超えたら売りです。
そうなんですか?
もしそうなら、私はそれを実行することができるようです。
こんにちは、Newdigitalです。
You mean that if CCI is going up crossing the 0 so it is signal to buy. Right?
CCIが下降トレンドにあり、ゼロを超えたら売りです。
そうなんですか?
はいそうなら、私はそれをすることができるようです。そうですね、確認の画像は必要ですか?
ご苦労様です。 このストラテジーはいかがでしょうか?
また、MA(25)をCCI(14)チャートにプロットして、同じシグナルを早めに出すこともできるし、CCIが0レベルを超えて方向性を確認するまで待つこともできる。
日足チャートは1時間足ほどノイジーではないので、日足チャートを使う方が良いと思います。
このEAを作成しました。
それを投稿に添付しようとしています。
でも、フィルターか他のインジケーターが必要だと思います。
そして、t/s = 6は良いアイデアではないと思います。
とにかく、私はそれをやった。
あなたのルールに従って正確であるべきです。
また、他のインジケータを追加することもできます。
CCI (14) チャートに MA (25) をプロットして、同じシグナルを早めに出すこともできますし、CCI が 0 レベルを越えて方向性を確認するまで待つこともできます。 IMHO では、1H ほどノイズのない日足チャートを使用する方がいいと思います。
Krallさん、こんにちは。
ご興味とアイデアをありがとうございます。
私もこのような可能性は考えていましたが、上に書いたように、最初の結果を検証するために、フィルターなしのシンプルなEAから始めています。
BrunoFXです。
今、添付できないので、コードを掲載します。
バグがないことを祈ります。
//| CCI_ea.mq4 |
//| code by Newdigital |
//| https://www.forex-tsd.com |
//| using Gordago software |
//| http://www.gordago.com |
//| |
//| 21.02.2006 CCI_ea by idea of BrunoFX |
//| (see the thread |
//| https://www.forex-tsd.com/suggestions-trading-systems/1089-cci_ea.html |
//| |
//+--------------------------------------------------------------------------+
#property copyright "BrunoFX and newdigital"
#property link "https://www.forex-tsd.com"
extern int MAGIC = 976714;
extern string PARAMETERS_TRADE = "PARAMETERS TRADE";
extern double Lots = 0.10;
extern int Slippage = 4;
extern double lStopLoss = 20;
extern double sStopLoss = 20;
extern double lTakeProfit = 200;
extern double sTakeProfit = 200;
extern double lTrailingStop = 6;
extern double sTrailingStop = 6;
extern string PARAMETERS_EXPERT = "PARAMETERS EXPERT";
extern color clOpenBuy = Blue;
extern color clCloseBuy = Aqua;
extern color clOpenSell = Red;
extern color clCloseSell = Violet;
extern color clModiBuy = Blue;
extern color clModiSell = Red;
extern string Name_Expert = "CCI_ea";
extern string PARAMETERS_ALARM = "PARAMETERS ALARM";
extern bool UseSound = True;
extern string NameFileSound = "alert.wav";
extern string PARAMETERS_HOURS = "TRADING HOURS";
extern bool UseHourTrade = True;
extern int FromHourTrade = 8;
extern int ToHourTrade = 18;
extern string PARAMETERS_INDICATOR_ONE = "CCI";
extern int CCIPeriod=14;
void deinit() {
Comment("");
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int start(){
if (UseHourTrade){
if (!(Hour()>=FromHourTrade && Hour()<=ToHourTrade)) {
Comment("Time for trade has not come else!");
return(0);
} else Comment("");
}else Comment("");
if(Bars<100){
Print("bars less than 100");
return(0);
}
if(lStopLoss<10){
Print("StopLoss less than 10");
return(0);
}
if(lTakeProfit<10){
Print("TakeProfit less than 10");
return(0);
}
if(sStopLoss<10){
Print("StopLoss less than 10");
return(0);
}
if(sTakeProfit<10){
Print("TakeProfit less than 10");
return(0);
}
double diCCI0=iCCI(NULL,0,CCIPeriod,PRICE_TYPICAL,1);
double diCCI1=iCCI(NULL,0,CCIPeriod,PRICE_TYPICAL,0);
double diCCI2=iCCI(NULL,0,CCIPeriod,PRICE_TYPICAL,0);
double d3=(0);
double diCCI4=iCCI(NULL,0,CCIPeriod,PRICE_TYPICAL,1);
double diCCI5=iCCI(NULL,0,CCIPeriod,PRICE_TYPICAL,0);
double diCCI6=iCCI(NULL,0,CCIPeriod,PRICE_TYPICAL,0);
double d7=(0);
double diCCI8=iCCI(NULL,0,CCIPeriod,PRICE_TYPICAL,1);
double diCCI9=iCCI(NULL,0,CCIPeriod,PRICE_TYPICAL,0);
double diCCI10=iCCI(NULL,0,CCIPeriod,PRICE_TYPICAL,0);
double d11=(0);
double diCCI12=iCCI(NULL,0,CCIPeriod,PRICE_TYPICAL,1);
double diCCI13=iCCI(NULL,0,CCIPeriod,PRICE_TYPICAL,0);
double diCCI14=iCCI(NULL,0,CCIPeriod,PRICE_TYPICAL,0);
double d15=(0);
if(AccountFreeMargin()<(1000*Lots)){
Print("We have no money. Free Margin = ", AccountFreeMargin());
return(0);
}
if (!ExistPositions()){
if ((diCCI0=d3)){
OpenBuy();
return(0);
}
if ((diCCI4>diCCI5 && diCCI6<=d7)){
OpenSell();
return(0);
}
}
if (ExistPositions()){
if(OrderType()==OP_BUY){
if ((diCCI8>diCCI9 && diCCI10<=d11)){
CloseBuy();
return(0);
}
}
if(OrderType()==OP_SELL){
if ((diCCI12=d15)){
CloseSell();
return(0);
}
}
}
TrailingPositionsBuy(lTrailingStop);
TrailingPositionsSell(sTrailingStop);
return (0);
}
bool ExistPositions() {
for (int i=0; i<OrdersTotal(); i++) {
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
if (OrderSymbol()==Symbol() && OrderMagicNumber()==MAGIC) {
return(True);
}
}
}
return(false);
}
void TrailingPositionsBuy(int trailingStop) {
for (int i=0; i<OrdersTotal(); i++) {
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
if (OrderSymbol()==Symbol() && OrderMagicNumber()==MAGIC) {
if (OrderType()==OP_BUY) {
if (Bid-OrderOpenPrice()>trailingStop*Point) {
if (OrderStopLoss()<Bid-trailingStop*Point)
ModifyStopLoss(Bid-trailingStop*Point);
}
}
}
}
}
}
void TrailingPositionsSell(int trailingStop) {
for (int i=0; i<OrdersTotal(); i++) {
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
if (OrderSymbol()==Symbol() && OrderMagicNumber()==MAGIC) {
if (OrderType()==OP_SELL) {
if (OrderOpenPrice()-Ask>trailingStop*Point) {
if (OrderStopLoss()>Ask+trailingStop*Point || OrderStopLoss()==0)
ModifyStopLoss(Ask+trailingStop*Point);
}
}
}
}
}
}
void ModifyStopLoss(double ldStopLoss) {
bool fm;
fm = OrderModify(OrderTicket(),OrderOpenPrice(),ldStopLoss,OrderTakeProfit(),0,CLR_NONE);
if (fm && UseSound) PlaySound(NameFileSound);
}
void CloseBuy() {
bool fc;
fc=OrderClose(OrderTicket(), OrderLots(), Bid, Slippage, clCloseBuy);
if (fc && UseSound) PlaySound(NameFileSound);
}
void CloseSell() {
bool fc;
fc=OrderClose(OrderTicket(), OrderLots(), Ask, Slippage, clCloseSell);
if (fc && UseSound) PlaySound(NameFileSound);
}
void OpenBuy() {
double ldLot, ldStop, ldTake;
string lsComm;
ldLot = GetSizeLot();
ldStop = GetStopLossBuy();
ldTake = GetTakeProfitBuy();
lsComm = GetCommentForOrder();
OrderSend(Symbol(),OP_BUY,ldLot,Ask,Slippage,ldStop,ldTake,lsComm,MAGIC,0,clOpenBuy);
if (UseSound) PlaySound(NameFileSound);
}
void OpenSell() {
double ldLot, ldStop, ldTake;
string lsComm;
ldLot = GetSizeLot();
ldStop = GetStopLossSell();
ldTake = GetTakeProfitSell();
lsComm = GetCommentForOrder();
OrderSend(Symbol(),OP_SELL,ldLot,Bid,Slippage,ldStop,ldTake,lsComm,MAGIC,0,clOpenSell);
if (UseSound) PlaySound(NameFileSound);
}
string GetCommentForOrder() { return(Name_Expert); }
double GetSizeLot() { return(Lots); }
double GetStopLossBuy() { return (Bid-lStopLoss*Point);}
double GetStopLossSell() { return(Ask+sStopLoss*Point); }
double GetTakeProfitBuy() { return(Ask+lTakeProfit*Point); }
double GetTakeProfitSell() { return(Bid-sTakeProfit*Point); }また、注文の取り消しに関するいくつかの改良が行われました。
注文の終了時にCCIの期間を選択することができるようになりました。
//+--------------------------------------------------------------------------+
//| CCI_ea.mq4 |
//| code by Newdigital |
//| https://www.forex-tsd.com |
//| using Gordago software |
//| http://www.gordago.com |
//| |
//| 21.02.2006 CCI_ea by idea of BrunoFX |
//| (see the thread |
//| https://www.forex-tsd.com/suggestions-trading-systems/1089-cci_ea.html |
//| |
//+--------------------------------------------------------------------------+
#property copyright "BrunoFX and newdigital"
#property link "https://www.forex-tsd.com"
extern int MAGIC = 976714;
extern string PARAMETERS_TRADE = "PARAMETERS TRADE";
extern double Lots = 0.10;
extern int Slippage = 4;
extern double lStopLoss = 20;
extern double sStopLoss = 20;
extern double lTakeProfit = 200;
extern double sTakeProfit = 200;
extern double lTrailingStop = 6;
extern double sTrailingStop = 6;
extern string PARAMETERS_EXPERT = "PARAMETERS EXPERT";
extern color clOpenBuy = Blue;
extern color clCloseBuy = Aqua;
extern color clOpenSell = Red;
extern color clCloseSell = Violet;
extern color clModiBuy = Blue;
extern color clModiSell = Red;
extern string Name_Expert = "CCI_ea";
extern string PARAMETERS_ALARM = "PARAMETERS ALARM";
extern bool UseSound = True;
extern string NameFileSound = "alert.wav";
extern string PARAMETERS_HOURS = "TRADING HOURS";
extern bool UseHourTrade = True;
extern int FromHourTrade = 8;
extern int ToHourTrade = 18;
extern string PARAMETERS_INDICATOR_ONE = "CCI";
extern int CCIPeriod_signal=14;//taking the signal to open buy or sell
extern int CCIPeriod_close_buy=14;
extern int CCIPeriod_close_sell=14;
void deinit() {
Comment("");
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int start(){
if (UseHourTrade){
if (!(Hour()>=FromHourTrade && Hour()<=ToHourTrade)) {
Comment("Time for trade has not come else!");
return(0);
} else Comment("");
}else Comment("");
if(Bars<100){
Print("bars less than 100");
return(0);
}
if(lStopLoss<10){
Print("StopLoss less than 10");
return(0);
}
if(lTakeProfit<10){
Print("TakeProfit less than 10");
return(0);
}
if(sStopLoss<10){
Print("StopLoss less than 10");
return(0);
}
if(sTakeProfit<10){
Print("TakeProfit less than 10");
return(0);
}
double diCCI0=iCCI(NULL,0,CCIPeriod_signal,PRICE_TYPICAL,1);
double diCCI1=iCCI(NULL,0,CCIPeriod_signal,PRICE_TYPICAL,0);
double diCCI2=iCCI(NULL,0,CCIPeriod_signal,PRICE_TYPICAL,0);
double d3=(0);
double diCCI4=iCCI(NULL,0,CCIPeriod_signal,PRICE_TYPICAL,1);
double diCCI5=iCCI(NULL,0,CCIPeriod_signal,PRICE_TYPICAL,0);
double diCCI6=iCCI(NULL,0,CCIPeriod_signal,PRICE_TYPICAL,0);
double d7=(0);
double diCCI8=iCCI(NULL,0,CCIPeriod_close_buy,PRICE_TYPICAL,1);
double diCCI9=iCCI(NULL,0,CCIPeriod_close_buy,PRICE_TYPICAL,0);
double diCCI10=iCCI(NULL,0,CCIPeriod_close_buy,PRICE_TYPICAL,0);
double d11=(0);
double diCCI12=iCCI(NULL,0,CCIPeriod_close_sell,PRICE_TYPICAL,1);
double diCCI13=iCCI(NULL,0,CCIPeriod_close_sell,PRICE_TYPICAL,0);
double diCCI14=iCCI(NULL,0,CCIPeriod_close_sell,PRICE_TYPICAL,0);
double d15=(0);
if(AccountFreeMargin()<(1000*Lots)){
Print("We have no money. Free Margin = ", AccountFreeMargin());
return(0);
}
if (!ExistPositions()){
if ((diCCI0=d3)){
OpenBuy();
return(0);
}
if ((diCCI4>diCCI5 && diCCI6<=d7)){
OpenSell();
return(0);
}
}
if (ExistPositions()){
if(OrderType()==OP_BUY){
if ((diCCI8>diCCI9 && diCCI10<=d11)){
CloseBuy();
return(0);
}
}
if(OrderType()==OP_SELL){
if ((diCCI12=d15)){
CloseSell();
return(0);
}
}
}
TrailingPositionsBuy(lTrailingStop);
TrailingPositionsSell(sTrailingStop);
return (0);
}
bool ExistPositions() {
for (int i=0; i<OrdersTotal(); i++) {
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
if (OrderSymbol()==Symbol() && OrderMagicNumber()==MAGIC) {
return(True);
}
}
}
return(false);
}
void TrailingPositionsBuy(int trailingStop) {
for (int i=0; i<OrdersTotal(); i++) {
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
if (OrderSymbol()==Symbol() && OrderMagicNumber()==MAGIC) {
if (OrderType()==OP_BUY) {
if (Bid-OrderOpenPrice()>trailingStop*Point) {
if (OrderStopLoss()<Bid-trailingStop*Point)
ModifyStopLoss(Bid-trailingStop*Point);
}
}
}
}
}
}
void TrailingPositionsSell(int trailingStop) {
for (int i=0; i<OrdersTotal(); i++) {
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
if (OrderSymbol()==Symbol() && OrderMagicNumber()==MAGIC) {
if (OrderType()==OP_SELL) {
if (OrderOpenPrice()-Ask>trailingStop*Point) {
if (OrderStopLoss()>Ask+trailingStop*Point || OrderStopLoss()==0)
ModifyStopLoss(Ask+trailingStop*Point);
}
}
}
}
}
}
void ModifyStopLoss(double ldStopLoss) {
bool fm;
fm = OrderModify(OrderTicket(),OrderOpenPrice(),ldStopLoss,OrderTakeProfit(),0,CLR_NONE);
if (fm && UseSound) PlaySound(NameFileSound);
}
void CloseBuy() {
bool fc;
fc=OrderClose(OrderTicket(), OrderLots(), Bid, Slippage, clCloseBuy);
if (fc && UseSound) PlaySound(NameFileSound);
}
void CloseSell() {
bool fc;
fc=OrderClose(OrderTicket(), OrderLots(), Ask, Slippage, clCloseSell);
if (fc && UseSound) PlaySound(NameFileSound);
}
void OpenBuy() {
double ldLot, ldStop, ldTake;
string lsComm;
ldLot = GetSizeLot();
ldStop = GetStopLossBuy();
ldTake = GetTakeProfitBuy();
lsComm = GetCommentForOrder();
OrderSend(Symbol(),OP_BUY,ldLot,Ask,Slippage,ldStop,ldTake,lsComm,MAGIC,0,clOpenBuy);
if (UseSound) PlaySound(NameFileSound);
}
void OpenSell() {
double ldLot, ldStop, ldTake;
string lsComm;
ldLot = GetSizeLot();
ldStop = GetStopLossSell();
ldTake = GetTakeProfitSell();
lsComm = GetCommentForOrder();
OrderSend(Symbol(),OP_SELL,ldLot,Bid,Slippage,ldStop,ldTake,lsComm,MAGIC,0,clOpenSell);
if (UseSound) PlaySound(NameFileSound);
}
string GetCommentForOrder() { return(Name_Expert); }
double GetSizeLot() { return(Lots); }
double GetStopLossBuy() { return (Bid-lStopLoss*Point);}
double GetStopLossSell() { return(Ask+sStopLoss*Point); }
double GetTakeProfitBuy() { return(Ask+lTakeProfit*Point); }
double GetTakeProfitSell() { return(Bid-sTakeProfit*Point); }こんにちは、ニューデジタルです。
応援しています。 どの効果で、どの速度か。
私はあなたがアラームとフィルタ時間serveurを置くことをスクリプトで参照してください。
実際にはそれが必要であることすべて。
私は明日の朝のようにそれをテストします。
あなたは最高です
CCIが0を超えたら、一回だけトレードを開始することにしたんだ。チャートを見てください。なぜこんなにたくさんのトレードがあるのでしょうか?
- 無料取引アプリ
- 8千を超えるシグナルをコピー
- 金融ニュースで金融マーケットを探索
こんにちは。
この(素晴らしい)フォーラムのツールやSOMMEストラテジーのいくつかをじっくり見て研究した結果、インジケータCCIが信頼できるフィルタのように使用されることが多いように思われました。
参考マーク。+100/-100と0は重要です。しかし、あまり深く考える前に、まず基準マーク0から考えてみましょう。
この基準マーク0を割ると同時に、相場は義務的に同じ方向に進みます。
では、この単純な値からEA(MT3またはMT4用)を作ることは可能でしょうか?
インジケータ:
CCI (10 or 14 ) (期間を変更 することができます)
FT:M30またはH1
SL: 20 (外部)
TP:200(外部)
TP:6(外部)
ルールオープン:基準マーク0を抜けたところ
クローズ:SL、またはTP、またはTS、または新しいクロスが基準マーク0から持ち越された場合。
まずはシンプルに、最初の結果に従って、フィルターをかけてみましょう。
この方法は、リスクとピップの最大値を取りたいとは思わないが、信頼性の高い、有利なたびに小さな取引の自分自身を確保するために。
このリクエストにご興味を持っていただき、ありがとうございます。