//+------------------------------------------------------------------+ //| エキスパート初期化関数 //+------------------------------------------------------------------+ int deinit() { //----
//---- return(0); } //+------------------------------------------------------------------+ //| エキスパートスタート機能 //+------------------------------------------------------------------+ int start() { Ilo1=Lot1; Ilo2=Lot2; if (UseMM) { Ilo1=TradeLot(AccountBalance())。 Ilo2=TradeLot(AccountBalance())。 }
//---- double Commissions=0;
if (操作1=="買い" || 操作1=="BUY") OP1=OP_BUY; if (操作2=="買い" || 操作2=="BUY") OP2=OP_BUY。 if (Operation1=="売り" || Operation1=="SELL") OP1=OP_SELL; if (操作2=="売り" || 操作2=="SELL") OP2=OP_SELL;
if (オペ1<0 ||オペ2<0) { {... Comment("間違った操作が選択されました、中止します..."); を返します。 }
if (GlobalVariableGet("_CanClose")==1 && CntOrd(OP1,0,Sym1)==0 && CntOrd(OP2,0,Sym2)==0)){ GlobalVariableSet("_CanClose",0)。 }
if (GlobalVariableGet("_CanClose")==0)。{ //初期注文を設定 SetOrders()を実行します。 }
void CloseAll() { int _total=OrdersTotal(); // 注文の数 int _ordertype;// 注文の種類 if (_total==0) {return;}。 int _ticket; // チケット番号 double _priceClose;// 注文を決済する価格。 //保有ポジションを全て決済 if (GlobalVariableGet("_CanClose")==1){。
for(int _i=_total-1;_i>=0;_i--) { if (オーダーセレクト(_i,SELECT_BY_POS)) { _ordertype=OrderType()。 _ticket=OrderTicket()。 スイッチ(_ordertype) { ケース 0: // 寄り付き買い _priceClose=MarketInfo(OrderSymbol(),MODE_BID); Print("Close on ",_i," position order with ticket ¹",_ticket); OrderClose(_ticket,OrderLots(),_priceClose,0,Red)。 ブレーク ケース1 // 寄り付き売り _priceClose=MarketInfo(OrderSymbol(),MODE_ASK); Print("Close on ",_i," position order with ticket ¹",_ticket); OrderClose(_ticket,OrderLots(),_priceClose,0,赤); ブレーク デフォルトでは // 1から5までの値、保留中の注文を削除する Print("Delete on ",_i," position order with ticket ¹",_ticket); OrderDelete(_ticket); ブレーク
} }
} を返します。 }
void SetOrders() { //初期注文の設定 double OpenPrice=0;
if (CntOrd(OP1,0,Sym1)==0){ if (OP1==OP_BUY) OpenPrice=MarketInfo(Sym1,MODE_ASK); if (OP1==OP_SELL) OpenPrice=MarketInfo(Sym1,MODE_BID)。 OrderSend(Sym1,OP1,Ilo1,OpenPrice,0,0,0, "HedgeTrader",0,0,Red); //リターン }
if (CntOrd(OP2,0,Sym2)==0){ if (OP2==OP_BUY) OpenPrice=MarketInfo(Sym2,MODE_ASK); if (OP2==OP_SELL) OpenPrice=MarketInfo(Sym2,MODE_BID); if (OP2==OP_SELL) OpenPrice=MarketInfo(Sym2,MODE_BID); OrderSend(Sym2,OP2,Ilo2,OpenPrice,0,0,0, "HedgeTrader",0,0,Green); //リターン }
}
int CntOrd(int Type, int Magic, string Symb) { //特定の注文の数を返す。 //特定のパラメータを持つ注文の数を返す int _CntOrd; _CntOrd=0; for(int i=0;i<OrdersTotal();i++) { OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
if (オーダーシンボル()==Symb) { (OrderSymbol()==Symb) if ( (OrderType()==Type && (OrderMagicNumber()==Magic) || Magic==0)) _CntOrd++; } } return(_CntOrd); }
こんにちは、皆さん。
私は修士に向かっているコンピュータサイエンスの学生で、FXに非常に興味を持っています。
基本的に、私は1つを必要とする人のために無料のExpert Advisorを作成することを提供します。私はちょうど私自身の最初のExpert Advisorを終えた、それは私に2007年から2008年にかけて100%のリターンを与えたが、2007年以前の年にはあまり良い実行、いくつかのも利益を得ることができない。そのため、私はより多くのインスピレーションを探しています
私はmq4と外国為替取引システム自体の両方で余分な経験のためにこれをやっています。
ところで、私はすでにインサイドバーのエキスパートに取り組んでいるので、その1つを考え出すことはありません:D.
あなたの計画で私にプライベートメッセージを送信し、あなたは、EAがあまりにも複雑でない場合、1週間以内に期待することができます。
ご挨拶
私はあなたがこれらのすべての返信の後にもう時間があるかどうかわからない...私は年間100%以上の利益を出す素晴らしい戦略を持っています...私がどれだけ熱心に取引しているかによりますが...私はEA用のコードを書く方法を知らないので、すべて手動で行います...。もし、あなたがこの件で私を助けてくれるなら、私は大いに感謝します...matthewjenson@gmail.com にメールを下さい。
こんにちは、皆さん。
私は修士に向かっているコンピュータサイエンスの学生で、外国為替に非常に興味を持っています。
基本的に、私は1つを必要とする人のための無料のExpert Advisorを作成するために提供しています。私はちょうど私自身の最初のExpert Advisorを終了し、それは私に2007年から2008年にかけて100%のリターンを与えたが、2007年以前の年にはあまり良い実行、いくつかのも利益を得ることができない。そのため、私はより多くのインスピレーションを探しています
私はmq4と外国為替取引システム自体の両方で余分な経験のためにこれをやっています。
ところで、私はすでにインサイドバーのエキスパートに取り組んでいるので、その1つを考え出すことはありません:D.
あなたの計画で私にプライベートメッセージを送信し、あなたは、EAがあまりにも複雑でない場合、1週間以内に期待することができます。
ご挨拶
助けてください。とてもとてもお忙しいのは想像できます。しかし、私はすべての通貨ペアで実行することができ、95から100パーセント正確である非常に良い収益性の長期的な自動トレーダーを探しています。これは、あなたができることでしょうか?どうか教えてください、そして良い仕事を続けてください :-)
bobwirwin3@aol.com までお気軽にメールしてください。
ありがとうございます...
//+------------------------------------------------------------------+
//| CHIFX.mq4について
//| 著作権 © 2008,chinex nig ltd|。
//| chinexannex@yahoo.com|
//+------------------------------------------------------------------+
#property copyright"著作権 © 2008, chinex nig ltd"
#property link "chinexannex@yahoo.com"
extern int takeprofit = 30; // 目標とする利益をpips単位で指定します。
extern int stoploss = 30; // 望む損失額(pips単位
extern int iTrailingStop= 30; // 目標利益に到達したときの拡張ピップゲイン
extern int slippage = 3; // 買値と売値の差は3pipsです。
extern double MA_1 = 14; // 14期間(ロング)の移動平均線
extern double MA_2 = 7; // 7期間の移動平均(ショート)
extern double RS1 = 14; // 14期間の相対標準指数
extern double S_FAST = 10; // %k期間のストキャスティック値
extern double S_SLOW = 3; // スローイング期間の確率値
extern double S_SIGN = 3; // %d期間のストキャスティクス値
extern double lot = 0.01; // 契約の単位サイズ
//+------------------------------------------------------------------+
//| エキスパート初期化関数
//+------------------------------------------------------------------+
int init()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| エキスパート初期化関数
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| エキスパートスタート機能
//+------------------------------------------------------------------+
int start()
{
//-------------------------------------------------------------------+
int cnt,ticket,total;
double RSI_CURR,RSI_PREV,MA_1,MA_2,STOCHVAL,STOCHSIGN;
//-------------------------------------------------------------------+
RSI_CURR =iRSI(NULL,0,14,PRICE_CLOSE,0);
RSI_PREV =iRSI(NULL,0,14,PRICE_CLOSE,1); RSI_PREV =iRSI(NULL,0,14,PRICE_CLOSE,1);
MA_1 =iMA (NULL,0,14,0,MODE_EMA,PRICE_CLOSE,0); MA_1 =iMA (NULL,0,14,0,MODE_EMA,PRICE_CLOSE,0);
MA_2 =iMA (NULL,0,7,0,MODE_EMA,PRICE_CLOSE,0)となります。
STOCHVAL =iStochastic(NULL,0,10,3,3,MODE_SMA,0,MODE_MAIN,0); STOCHSIGN =iStochastic(NULL,0,10,3,0,MODE_MAIN,0);
STOCHSIGN=iStochastic(NULL,0,10,3,3,MODE_SMA,0,MODE_SIGNAL,0);
//-------------------------------------------------------------------+
//+------------------------------------------------------------------+
//| 最適なロットサイズを計算する
//+------------------------------------------------------------------+
double Lot = lot;
double dFreeMargin = AccountFreeMargin()*lot/100;
Lot = NormalizeDouble(dFreeMargin,2);
if (AccountFreeMargin()<(10000*lot))
{
Print("we have no money", AccountFreeMargin())。
return(0);
}
//+---------------------------------------------------------------+
//| ロングポジションのクローズ/オープンのリクエスト
//+---------------------------------------------------------------+
if(STOCHVAL>STOCHSIGN && Open[0])
{
//---------------------
total=OrdersTotal()です。
if(total<2)
{
ticket=OrderSend(Symbol(),OP_BUY,lot,Ask,3,Ask-stoploss*Point,Ask+takeprofit*Point,「ロングポジション」, 0,0,Blue).If(ticket>0) {;
if(ticket>0)
{
OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES);
Print("BUY order opentime : ", OrderOpenTime());
Print("BUY order opened : ", OrderOpenPrice()); Print("BUY order opened : ", OrderOpenPrice());
Print("買い注文の終了 : ", OrderClosePrice()); Print("買い注文の終了 : ", OrderClosePrice());
Print("BUY order AccountProfit: ", AccountProfit());
}
その他
Print("Error opening BUY order : ",GetLastError()).を実行します。
return(0);
}
//---------------------------------------------------------------------
if(STOCHVAL<STOCHSIGN)
{
//-----------------
for(cnt=0;cnt<total;cnt++)
{
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
if(OrderType()<=OP_BUY && // オープンポジションをチェック)
OrderSymbol()==Symbol()) // シンボルをチェック
{
if(OrderType()==OP_BUY)の場合。 // ロングポジションがオープン
{
// クローズすべき?
OrderClose(OrderTicket(),OrderLots(),Ask,3,Blue); // ポジションクローズ
return(0);
}
//-----------------------
Sleep(1000); //1秒間EAを停止させる
//-------------
if((STOCHVAL<STOCHSIGN && Open[0]))
{
//---------------------
total=OrdersTotal()です。
if(total<2)
{
ticket=OrderSend(Symbol(),OP_SELL,lot,Bid,3,Bid+stoploss*Point,Bid-takeprofit*Point, "short position",0,0,Red); if(ticket>0) {;
if(ticket>0)
{
オーダーセレクト(ticket,SELECT_BY_TICKET,MODE_TRADES);
Print("SELL order opentime : ", OrderOpenTime());
Print("SELL order opened : ", OrderOpenPrice()); Print("SELL order closed : ", OrderOpenPrice());
Print("売り注文の終了 : ",OrderClosePrice()); Print("売り注文の終了 : ",OrderClosePrice());
Print("SELL order AccountProfit: ", AccountProfit());
}
さもなければ
Print("売り注文の開始エラー : ",GetLastError())。
return(0);
//----------------------------
if(STOCHVAL>STOCHSIGN)
{
for(cnt=0;cnt<total;cnt++)
{
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
if(OrderType()<=OP_SELL && // 開いたポジションをチェック)
OrderSymbol()==Symbol()) // シンボルをチェック
{
if(OrderType()==OP_SELL) // ロングポジションがオープンされました。
{
// クローズすべき?
//-----------------
OrderClose(OrderTicket(),OrderLots(),Bid,3,Red); // ポジションクローズ
return(0);
}
//-----------------------
Sleep(1000); //1秒間EAを停止させる
//+------------------------------------------------------------------------------------+
//| ポジションの変更 - トレーリングストップに基づいたストップロス
//+------------------------------------------------------------------------------------+
if(iTrailingStop>0)
{
if(OrderType()==OP_BUY)
{
if(Bid-OrderOpenPrice()>Point*iTrailingStop)
{
if(オーダーストップ・ロス()<ビッドポイント*iTrailingStop)
{
注文変更(OrderTicket(),OrderOpenPrice(),Bid-Point*iTrailingStop,OrderTakeProfit(),0,Green);
その他
if(OrderType()==OP_SELL)
{
if(注文開始価格()-アスク > ポイント*iトレールストップ)
if(OrderStopLoss()>アスク+ポイント*iTrailingStop)
{
注文変更(OrderTicket(),OrderOpenPrice(),Ask+Point*iTrailingStop,OrderTakeProfit(),0,Yellow).を実行します。
}
}}}}}}}}}}}
hi, I need your help on this ea. It doesn't open trades and it's backtesting is poor.
...............................chinexex
//+------------------------------------------------------------------+
//| CHIFX.mq4について
//| 著作権 © 2008,chinex nig ltd|。
//| chinexannex@yahoo.com|
//+------------------------------------------------------------------+
#property copyright"著作権 © 2008, chinex nig ltd"
#property link "chinexannex@yahoo.com"
extern int takeprofit = 30; // 目標とする利益をpips単位で指定します。
extern int stoploss = 30; // 望む損失額(pips単位
extern int iTrailingStop= 30; // 目標利益に到達したときの拡張ピップゲイン
extern int slippage = 3; // 買値と売値の差は3pipsです。
extern double MA_1 = 14; // 14期間(ロング)の移動平均線
extern double MA_2 = 7; // 7期間の移動平均(ショート)
extern double RS1 = 14; // 14期間の相対標準指数
extern double S_FAST = 10; // %k期間のストキャスティック値
extern double S_SLOW = 3; // スローイング期間の確率値
extern double S_SIGN = 3; // %d期間のストキャスティクス値
extern double lot = 0.01; // 契約の単位サイズ
//+------------------------------------------------------------------+
//| エキスパート初期化関数
//+------------------------------------------------------------------+
int init()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| エキスパート初期化関数
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| エキスパートスタート機能
//+------------------------------------------------------------------+
int start()
{
//-------------------------------------------------------------------+
int cnt,ticket,total;
double RSI_CURR,RSI_PREV,MA_1,MA_2,STOCHVAL,STOCHSIGN;
//-------------------------------------------------------------------+
RSI_CURR =iRSI(NULL,0,14,PRICE_CLOSE,0);
RSI_PREV =iRSI(NULL,0,14,PRICE_CLOSE,1); RSI_PREV =iRSI(NULL,0,14,PRICE_CLOSE,1);
MA_1 =iMA (NULL,0,14,0,MODE_EMA,PRICE_CLOSE,0); MA_1 =iMA (NULL,0,14,0,MODE_EMA,PRICE_CLOSE,0);
MA_2 =iMA (NULL,0,7,0,MODE_EMA,PRICE_CLOSE,0)となります。
STOCHVAL =iStochastic(NULL,0,10,3,3,MODE_SMA,0,MODE_MAIN,0); STOCHSIGN =iStochastic(NULL,0,10,3,0,MODE_MAIN,0);
STOCHSIGN=iStochastic(NULL,0,10,3,3,MODE_SMA,0,MODE_SIGNAL,0);
//-------------------------------------------------------------------+
//+------------------------------------------------------------------+
//| 最適なロットサイズを計算する
//+------------------------------------------------------------------+
double Lot = lot;
double dFreeMargin = AccountFreeMargin()*lot/100;
Lot = NormalizeDouble(dFreeMargin,2);
if (AccountFreeMargin()<(10000*lot))
{
Print("we have no money", AccountFreeMargin())。
return(0);
}
//+---------------------------------------------------------------+
//| ロングポジションのクローズ/オープンのリクエスト
//+---------------------------------------------------------------+
if(STOCHVAL>STOCHSIGN && Open[0])
{
//---------------------
total=OrdersTotal()。
if(total<2)
{
ticket=OrderSend(Symbol(),OP_BUY,lot,Ask,3,Ask-stoploss*Point,Ask+takeprofit*Point,「ロングポジション」, 0,0,Blue).If(ticket>0) {;
if(ticket>0)
{
OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES);
Print("BUY order opentime : ", OrderOpenTime());
Print("BUY order opened : ", OrderOpenPrice()); Print("BUY order opened : ", OrderOpenPrice());
Print("買い注文の終了 : ", OrderClosePrice()); Print("買い注文の終了 : ", OrderClosePrice());
Print("BUY order AccountProfit: ", AccountProfit());
}
その他
Print("Error opening BUY order : ",GetLastError()).を実行します。
return(0);
}
//---------------------------------------------------------------------
if(STOCHVAL<STOCHSIGN)
{
//-----------------
for(cnt=0;cnt<total;cnt++)
{
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
if(OrderType()<=OP_BUY && // オープンポジションをチェック)
OrderSymbol()==Symbol()) // シンボルをチェック
{
if(OrderType()==OP_BUY)の場合。 // ロングポジションがオープン
{
// クローズすべき?
OrderClose(OrderTicket(),OrderLots(),Ask,3,Blue); // ポジションクローズ
return(0);
}
//-----------------------
Sleep(1000); //1秒間EAを停止させる
//-------------
if((STOCHVAL<STOCHSIGN && Open[0]))
{
//---------------------
total=OrdersTotal()です。
if(total<2)
{
ticket=OrderSend(Symbol(),OP_SELL,lot,Bid,3,Bid+stoploss*Point,Bid-takeprofit*Point, "short position",0,0,Red); if(ticket>0) {;
if(ticket>0)
{
オーダーセレクト(ticket,SELECT_BY_TICKET,MODE_TRADES);
Print("SELL order opentime : ", OrderOpenTime());
Print("SELL order opened : ", OrderOpenPrice()); Print("SELL order closed : ", OrderOpenPrice());
Print("売り注文の終了 : ",OrderClosePrice()); Print("売り注文の終了 : ",OrderClosePrice());
Print("SELL order AccountProfit: ", AccountProfit());
}
さもなければ
Print("売り注文の開始エラー : ",GetLastError())。
return(0);
//----------------------------
if(STOCHVAL>STOCHSIGN)
{
for(cnt=0;cnt<total;cnt++)
{
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
if(OrderType()<=OP_SELL && // 開いたポジションをチェック)
OrderSymbol()==Symbol()) // シンボルをチェック
{
if(OrderType()==OP_SELL) // ロングポジションがオープンされました。
{
// クローズすべき?
//-----------------
OrderClose(OrderTicket(),OrderLots(),Bid,3,Red); // ポジションクローズ
return(0);
}
//-----------------------
Sleep(1000); //1秒間EAを停止させる
//+------------------------------------------------------------------------------------+
//| ポジションの変更 - トレーリングストップに基づいたストップロス
//+------------------------------------------------------------------------------------+
if(iTrailingStop>0)
{
if(OrderType()==OP_BUY)
{
if(Bid-OrderOpenPrice()>Point*iTrailingStop)
{
if(オーダーストップ・ロス()<ビッドポイント*iTrailingStop)
{
注文変更(OrderTicket(),OrderOpenPrice(),Bid-Point*iTrailingStop,OrderTakeProfit(),0,Green);
その他
if(OrderType()==OP_SELL)
{
if(注文開始価格()-アスク > ポイント*iトレールストップ)
if(OrderStopLoss()>アスク+ポイント*iTrailingStop)
{
注文変更(OrderTicket(),OrderOpenPrice(),Ask+Point*iTrailingStop,OrderTakeProfit(),0,Yellow).を実行します。
}
}}}}}}}}}}}
hi, I need your help on this ea. It doesn't open trades and it's backtesting is poor.
...............................chinexex
私はスクリプトを書くために持っている。marperga@net.hr にメールを送っていただければ、説明します。
もしあなたがEAを修正するのを助けることができるなら、それは取引を配置しません、また、マジックナンバーが必要です。
//+------------------------------------------------------------------+
|| Copyright © 2009, MetaQuotes Software Corp.
//|https://www.metaquotes.net/|
//+------------------------------------------------------------------+
#property copyright "著作権 © 2009, MetaQuotes Software Corp."
#property link "https://www.metaquotes.net/"
//---- 入力パラメータ
extern double Lot1=0.1;
extern double Lot2=0.1;
extern string Sym1="EURUSD";
extern string Sym2="USDCHF";
extern string Operation1="buy";
extern string Operation2="buy";
extern double Commission1=0.0;
extern double Commission2=0.0;
extern double Profit=50;
extern double multiply= 1.6;
extern int MaxTrades= 4; // 注文の最大発注枚数
extern int Pips= 50; // ある注文から別の注文までのピップスでの距離
extern int StopLoss = 300; // ストップロス(損切り)値
extern int TrailingStop = 15;// StopLossをトレールするPips数
extern bool BuyStopOrders=True.BuyStopOrders=True.BuyStopOrders=True;
extern bool UseMM=true;
extern string Bollinger_Symbol = "EURCHF";
int OP1=-1, OP2=-1;
double Ilo1=0, Ilo2=0;
extern double Lots = 0.1;
extern double GridSize = 50;
extern double GridSteps = 2;
extern double TakeProfit = 50;
extern string Data5 = " * * * マネーマネジメント";
extern bool AccountIsMicro = false;
extern double ProfitTarget = 50;
extern double Risk = 6;
//+------------------------------------------------------------------+
//| エキスパート初期化関数
//+------------------------------------------------------------------+
int init()
{
//----
//グローバル変数の初期化
if (!GlobalVariableCheck("_CanClose")) { //グローバル変数を設定する。
GlobalVariableSet("_CanClose",0)。
}
//if (!GlobalVariableCheck("_CanSet")) { //GlobalVariableSet("_CanSet")。
//GlobalVariableSet("_CanSet",0)を実行します。
//}
//----
return(0);
//+------------------------------------------------------------------+
//| エキスパート初期化関数
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| エキスパートスタート機能
//+------------------------------------------------------------------+
int start()
{
Ilo1=Lot1; Ilo2=Lot2;
if (UseMM) {
Ilo1=TradeLot(AccountBalance())。
Ilo2=TradeLot(AccountBalance())。
}
//----
double Commissions=0;
if (操作1=="買い" || 操作1=="BUY") OP1=OP_BUY;
if (操作2=="買い" || 操作2=="BUY") OP2=OP_BUY。
if (Operation1=="売り" || Operation1=="SELL") OP1=OP_SELL;
if (操作2=="売り" || 操作2=="SELL") OP2=OP_SELL;
if (オペ1<0 ||オペ2<0) { {...
Comment("間違った操作が選択されました、中止します...");
を返します。
}
if (GlobalVariableGet("_CanClose")==1 && CntOrd(OP1,0,Sym1)==0 && CntOrd(OP2,0,Sym2)==0)){
GlobalVariableSet("_CanClose",0)。
}
if (GlobalVariableGet("_CanClose")==0)。{
//初期注文を設定
SetOrders()を実行します。
}
Comment("残高=",AccountBalance()," \n",Sym1, "Lot=",Ilo1," ",Sym2, "Lot=",Ilo2,"\nFloating profit=",CalcProfit(), "Expected profit=",Profit*Ilo1*10");
//利益を確認する
手数料=手数料1*Ilo1+手数料2*Ilo1;
if ( (CalcProfit()-Commissions) >= (Profit*Ilo1*10) ){
GlobalVariableSet("_CanClose",1)。
}
CloseAll();
//----
return(0);
}
//+------------------------------------------------------------------+
double CalcProfit() {
//オープンしたポジションの利益を計算する
int cnt;
double _Profit;
_Profit=0;
for(cnt=0; cnt<OrdersTotal(); cnt++)
{
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol()==Sym1 || OrderSymbol()==Sym2) { (OrderSymbol()==Sym1 || OrderSymbol()==Sym2 )
_Profit=_Profit+OrderProfit()。
}
}
return(_Profit);
}
void CloseAll() {
int _total=OrdersTotal(); // 注文の数
int _ordertype;// 注文の種類
if (_total==0) {return;}。
int _ticket; // チケット番号
double _priceClose;// 注文を決済する価格。
//保有ポジションを全て決済
if (GlobalVariableGet("_CanClose")==1){。
for(int _i=_total-1;_i>=0;_i--)
{
if (オーダーセレクト(_i,SELECT_BY_POS))
{
_ordertype=OrderType()。
_ticket=OrderTicket()。
スイッチ(_ordertype)
{
ケース 0:
// 寄り付き買い
_priceClose=MarketInfo(OrderSymbol(),MODE_BID);
Print("Close on ",_i," position order with ticket ¹",_ticket);
OrderClose(_ticket,OrderLots(),_priceClose,0,Red)。
ブレーク
ケース1
// 寄り付き売り
_priceClose=MarketInfo(OrderSymbol(),MODE_ASK);
Print("Close on ",_i," position order with ticket ¹",_ticket);
OrderClose(_ticket,OrderLots(),_priceClose,0,赤);
ブレーク
デフォルトでは
// 1から5までの値、保留中の注文を削除する
Print("Delete on ",_i," position order with ticket ¹",_ticket);
OrderDelete(_ticket);
ブレーク
}
}
}
を返します。
}
void SetOrders() {
//初期注文の設定
double OpenPrice=0;
if (CntOrd(OP1,0,Sym1)==0){
if (OP1==OP_BUY) OpenPrice=MarketInfo(Sym1,MODE_ASK);
if (OP1==OP_SELL) OpenPrice=MarketInfo(Sym1,MODE_BID)。
OrderSend(Sym1,OP1,Ilo1,OpenPrice,0,0,0, "HedgeTrader",0,0,Red);
//リターン
}
if (CntOrd(OP2,0,Sym2)==0){
if (OP2==OP_BUY) OpenPrice=MarketInfo(Sym2,MODE_ASK);
if (OP2==OP_SELL) OpenPrice=MarketInfo(Sym2,MODE_BID); if (OP2==OP_SELL) OpenPrice=MarketInfo(Sym2,MODE_BID);
OrderSend(Sym2,OP2,Ilo2,OpenPrice,0,0,0, "HedgeTrader",0,0,Green);
//リターン
}
}
int CntOrd(int Type, int Magic, string Symb) { //特定の注文の数を返す。
//特定のパラメータを持つ注文の数を返す
int _CntOrd;
_CntOrd=0;
for(int i=0;i<OrdersTotal();i++)
{
OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
if (オーダーシンボル()==Symb) { (OrderSymbol()==Symb)
if ( (OrderType()==Type && (OrderMagicNumber()==Magic) || Magic==0)) _CntOrd++;
}
}
return(_CntOrd);
}
ダブルトレードロット(double MyBalance) { {
double _Ilo=0;
//AccountEquity()
_Ilo=MathFloor(MyBalance/Delta)/10。
if (_Ilo<0.1) _Ilo=0.1;
return (_Ilo);
}
こんにちは。
Pls私は本当に私の外国為替戦略を開発するためにあなたの助けを必要としています。それは非常に有益であり、私は本当にEAにそれを必要とします。
私はあなたが私を義務付ける場合、より感謝されるでしょう。
Pls私の電子メールアドレスは、enofe1912@yahoo.com。
私はあなたに戦略を転送することができますので、私にメールを送信します。
以下は、1月26日から今日までのトランザクションの詳細です。
ありがとうございます。
こんにちは。
長い間、EAを作ろうとしています。EMAのクロスのコードを書くのを手伝ってくれませんか。すべてのクロスで通貨を売り買いし、次のクロスで売り買いをします。besf regards, eseq@op.pl
こんにちは、私はEAを組み立てる方法についての助けを必要とする私に電子メールを送ってください polo_4rextrader@hotymail.com
ありがとうございます。
こんにちは、私はそれを微調整したいことを除いて、この典型的なマーチンゲール EAを持っています!基本的に私がしたいことは、それがSLに当たったときにポジションを閉じて、ロットを倍にする代わりに、ポジションを開いたまま、TPがヒットした後にのみ閉じるということです。だから、ペアは私に対して、例えば5レベル動くことができ、ポジションはペアが私の方向に動き、TPをヒットし、すべてのポジションをクローズするまでオープンにしておくのである。ご理解いただけたでしょうか?
こんにちは、vriesde1 です。
いつもありがとうございます。
私は私のためにEAを作成するために人々に尋ねた tft矢印 ( gann_hilo指標の修正版 )非常に矢印でエントリと出口を持つ&任意のエントリ信号が前の順序を閉じているいつでも反対側の順序です。eaはよく働くが、狭い動きの間にそれはそれとして上部で買う及び販売する底を信号2つの蝋燭の後でだけ。あなたはそれがそれらの矢印の任意の再描画せずに非常に矢印ポイントで注文を取ることができるように、それを変更することができますか?
事前にありがとうございました、私の電子メールアドレス
fontu