コーディングのヘルプ - ページ 477 1...470471472473474475476477478479480481482483484...786 新しいコメント yinyang88 2015.05.25 09:28 #4761 こんにちは、マスターコーダーです。 PPO_altインジケータを作ろうとしたのですが、写真a,bのプロット1が、リアルタイムモードでは正しく表示されないのです。 そこで、オリジナルのPPO(プロット2)を修正しようとしたのですが、やはり正しくありません。 どうか見ていただいて、両方を修正していただけないでしょうか。 よろしくお願いします。 PS. 不明な点があれば、また質問してください。 ファイル: ppo_mod.rar 80 kb myname 2015.05.26 04:58 #4762 download38: マスターコーダーさん、こんにちは。PPO_altというインディケータを作ろうとしたのですが、写真a,bのプロット1が、リアルタイムモードでは正しく描画されません。 そこで、オリジナルのPPO(プロット2)を修正しようとしたのですが、やはり正しくありません。 どうか見ていただいて、両方を修正していただけないでしょうか。 よろしくお願いします。 追記です。 不明な点があれば、また質問してください。 なぜ、2つのループで全く同じことをするのですか? vegadigitalco 2015.05.26 05:17 #4763 こんにちはMladen ヘルプが必要です ライブクォートを取得しないヘルプをお願いします //+------------------------------------------------------------------+ //| エキスパート初期化関数 //+------------------------------------------------------------------+ #property indicator_chart_window double ExtMapBuffer1[]; extern int RSI_periode = 14; extern int RSI_level = 50; extern color BuyColor = clrLime; extern color SellColor = clrRed; extern color BuyColor = clrLime; extern color SellColor = clrRed; extern int horizontal = 20; extern int vertical = 50; extern int shift = 1; extern double percent = 0.25; extern string fontmode = "Arial"; extern int fontsize = 10; extern color fontcolor = clrSkyBlue; extern int columnspacing = 100; int init() { //---- SetIndexStyle(0,DRAW_LINE)を設定します。 SetIndexBuffer(0,ExtMapBuffer1)を設定します. //---- return(0); } //+------------------------------------------------------------------+ //| エキスパートによる初期化関数 //+------------------------------------------------------------------+ int deinit() { //---- ObjectsDeleteAll(); ObjectDelete("INFO"); //---- return(0); } //+------------------------------------------------------------------+ //| エキスパートスタート機能 //+------------------------------------------------------------------+ int start() { //---- string symlist2[] = {"NIFTY", "B.NIFTY", "XAUUSD", "GOLD"}; 文字列シンボル string info2[] = {MODE_HIGH,MODE_LOW,MODE_BID,MODE_ASK}; string info2[] = {MODE_HIGH,MODE_LOW,MODE_BID,MODE_ASK}; string infolabel; string timeText[] = {"DayHigh", "DayLow", "Bid", "Ask"}; string font = "ターミナル"; int counted_bars=IndicatorCounted(); int symlimit = ArraySize(symlist2); int timelimit = ArraySize(info2); int timelimit = ArraySize(info2); for(int i=0;i<symlimit;i++) { symbol = symlist2; Display("symlabel" + symbol + i, horizontal,vertical); ObjectSetText("symlabel" + symbol + i, "SYMBOL", fontsize, font, Pink).ObjectSetText("sym" + symbol + i, "SYMBOL", fontsize, font, Pink); 表示("sym" + symbol + i, horizontal,vertical +((i+1)*18)); ObjectSetText("sym" + symbol + i, "" + symbol + "", fontsize, font, Yellow)を実行します。 for(int j=0;j<timelimit;j++) { infolabel = info2[j]; 表示("infolabel" + j, horizontal+((j+1)*100),vertical); ObjectSetText("infolabel" + j, timeText[j], fontsize, font, Pink); 表示("infolabel2" + 記号 + ((j+1)*columnspacing), horizontal+((j+1)*100),vertical +((i+1)*18)); ObjectSetText("infolabel" + j, timeText[j], fontize, font, Pink); ObjectSetText("infolabel2" +symbol+ ((j+1)*columnspacing), infolabel , fontsize, font, fontcolor).を表示します。 } } //---- return(0); } void Display(文字列名, int x, int y) { ObjectCreate(name,OBJ_LABEL, 0, 0, 0); ObjectCreate(name,OBJ_LABEL, 0, 0, 0); ObjectSet(name, OBJPROP_CORNER, 0); ObjectSet(name, OBJPROP_CORNER, 0); ObjectSet(name, OBJPROP_XDISTANCE, x); ObjectSet(name, OBJPROP_XDISTANCE, x); ObjectSet(name, OBJPROP_YDISTANCE, y); ObjectSet(name, OBJPROP_XDISTANCE, x); ObjectSet(name, OBJPROP_BACK, FALSE); } Coding help Pls Help to Develop ea coding HELP REQUIRED yinyang88 2015.05.26 06:24 #4764 nbtrading: なぜ2つのループで全く同じことをするのですか? ああ、私はただ見やすいように点をつけて線をプロットしたいだけなのです。 重要な 線は、私が問題にしているmultihighです。 ご質問ありがとうございます。 tfi_markets 2015.05.27 06:07 #4765 "Close BUY" と "Close SELL" のアルゴリズム こんにちは、プロコーダーズです。 クローズBUY」と「クローズSELL」アルゴリズムについて、どなたかレビューしていただけないでしょうか? EAはストップロスや トレンドの変化が起こった後、新しいポジションを開くことはありません。 システムはポジションを閉じているだけで、次のポジションは新しいトレンドの変化で開かれ、それは機会損失につながります。 (スクリーンショットをご覧ください)。 void CheckForClose() { RefreshRates(); double cl_diCustom0 = iCustom(s_symbol,TenkanKijunTf, "Tenkan Sen-Kijun Sen",0,Tenkan,Kijun,0,bar); double cl_diCustom1 = iCustom(s_symbol,TenkanKijunTf, "Tenkan Sen-Kijun Sen",0,Tenkan,Kijun,1,bar); double cl_diCustom1 = iCustom(s_symbol,TenkanKijunTf,Tenkan-Kijun Sen",0,Tenkan,Kijun,1,bar) double cl_diCustom2 = iCustom(s_symbol,TenkanKijunTf, "Tenkan Sen-Kijun Sen",0,Tenkan,Kijun,1,bar); double cl_diCustom3 = iCustom(s_symbol,TenkanKijunTf, "Tenkan Sen-Kijun Sen",0,Tenkan,Kijun,1,bar+1); double cl_diCustom3 = iCustom(s_symbol,TenkanKijunTf,Tenkan-Kijun Sen,1,bar+1); double cl_diMA3 = iMA(s_symbol,MaTimeframe,MaPeriod,0,MaType,PRICE_CLOSE,bar)。 double cl_diMA4 = iMA(s_symbol,MaTimeframe,MaPeriod,0,MaType,PRICE_CLOSE,bar+1); double cl_diMA4 = iMA(s_symbol,MaTimeframe,MaPeriod,0,MaType,PRICE_CLOSE,bar+1); for(int i=0;i<OrdersTotal(); i++) { if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false) break; if(OrderMagicNumber()!=MAGIC)を続ける。 if(OrderSymbol() != s_symbol) continue; if(OrderSymbol() != s_symbol) continue; //+------------+ //|終値買|||||終値買 //+------------+ if(cl_diCustom0!=cl_diCustom1) //トレンドチェック { if(OrderType()==OP_BUY)の場合。 { if(cl_diCustom0<cl_diCustom1 && cl_diCustom2=cl_diMA4) { bool buyClose=OrderClose(OrderTicket(),OrderLots(),MarketInfo(s_symbol,MODE_BID),Slippage*pipMultiplier,clCloseBuy); if(buyClose==false) { int ErrorCode = GetLastError(); 文字列ErrDesc = ErrorDescription(ErrorCode); string ErrAlert= StringConcatenate("買い注文を閉じる - Error ",ErrorCode,": ",ErrDesc); if(ShowAlerts == true) アラート(ErrAlert); string ErrLog=StringConcatenate("Bid:",MarketInfo(s_symbol,MODE_BID)," Lots:",OrderLots()," Ticket:",OrderTicket()); Print(ErrLog)を実行します。 ブレーク // 修正 } //+-------------+ //| 売りを閉じる //+-------------+ if(cl_diCustom0!=cl_diCustom1) { if(オーダータイプ()==OP_SELL) { if(cl_diCustom0>cl_diCustom1 && cl_diCustom2>cl_diMA3 && cl_diCustom3<=cl_diMA4) { bool sellClose= OrderClose(OrderTicket(),OrderLots(),MarketInfo(s_symbol,MODE_ASK),Slippage*pipMultiplier,clcloseSell); if(sellClose == false) { ErrorCode = GetLastError(); ErrDesc = ErrorDescription(ErrorCode)。 ErrAlert=StringConcatenate("Close Sell Order - Error ",ErrorCode,": ",ErrDesc); if(ShowAlerts==true) アラート(ErrAlert); ErrLog=StringConcatenate("アスク:",MarketInfo(s_symbol,MODE_ASK)," Lots:",OrderLots()," Ticket:",OrderTicket()); Print(ErrLog); ブレーク // 修正 } } } } ファイル: notopennew_position.jpg 152 kb whisperer 2015.05.27 21:10 #4766 tfi_markets: こんにちは、Pro-Codersです。クローズBUY」と「クローズSELL」のアルゴリズムについて、どなたかレビューしていただけないでしょうか? EAはストップロスやトレンドの変化が起こった後、新しいポジションをオープンしません。 システムはただポジションを閉じているだけで、次のポジションは新しいトレンドの変化で開かれるため、機会損失につながります。 (スクリーンショットをご覧ください) これを変更します。 for(int i=0;i<OrdersTotal(); i++) を次のように変更します。 for(int i=OrdersTotal()-1;i>=0 ; i--) に変更します。 zigflip 2015.05.28 00:04 #4767 mladen: 多分、特定のメタトレーダーのビルドの問題だと思います。 私のビルド765 Pruchikはこのバージョンをここで提供しました。 https://www.mql5.com/en/forum/173588 しかし、Gann sq9 インジケータがチャート上に線を残して変更された場合、その線を削除するための追加スクリプトが必要です。 vegadigitalco 2015.05.28 02:32 #4768 この表示情報の問題を解決するには............。 vegadigitalco: こんにちは、Mladen & All senior Codderです。このディスプレイ情報の問題を解決する必要があります。 ライブ見積もりを取得しないヘルプしてください //+------------------------------------------------------------------+ //| エキスパート初期化機能 //+------------------------------------------------------------------+ #property indicator_chart_window double ExtMapBuffer1[]; extern int RSI_periode = 14; extern int RSI_level = 50; extern color BuyColor = clrLime; extern color SellColor = clrRed; extern color BuyColor = clrLime; extern color SellColor = clrRed; extern int horizontal = 20; extern int vertical = 50; extern int shift = 1; extern double percent = 0.25; extern string fontmode = "Arial"; extern int fontsize = 10; extern color fontcolor = clrSkyBlue; extern int columnspacing = 100; int init() { //---- SetIndexStyle(0,DRAW_LINE)を設定します。 SetIndexBuffer(0,ExtMapBuffer1)を設定します. //---- return(0); } //+------------------------------------------------------------------+ //| エキスパートによる初期化関数 //+------------------------------------------------------------------+ int deinit() { //---- ObjectsDeleteAll(); ObjectDelete("INFO"); //---- return(0); } //+------------------------------------------------------------------+ //| エキスパートスタート機能 //+------------------------------------------------------------------+ int start() { //---- string symlist2[] = {"NIFTY", "B.NIFTY", "XAUUSD", "GOLD"}; 文字列シンボル string info2[] = {MODE_HIGH,MODE_LOW,MODE_BID,MODE_ASK}; string info2[] = {MODE_HIGH,MODE_LOW,MODE_BID,MODE_ASK}; string infolabel; string timeText[] = {"DayHigh", "DayLow", "Bid", "Ask"}; string font = "ターミナル"; int counted_bars=IndicatorCounted(); int symlimit = ArraySize(symlist2); int timelimit = ArraySize(info2); int timelimit = ArraySize(info2); for(int i=0;i<symlimit;i++) { symbol = symlist2; Display("symlabel" + symbol + i, horizontal,vertical); ObjectSetText("symlabel" + symbol + i, "SYMBOL", fontsize, font, Pink).ObjectSetText("sym" + symbol + i, "SYMBOL", fontsize, font, Pink); 表示("sym" + symbol + i, horizontal,vertical +((i+1)*18)); ObjectSetText("sym" + symbol + i, "" + symbol + "", fontsize, font, Yellow)を実行します。 for(int j=0;j<timelimit;j++) { infolabel = info2[j]; 表示("infolabel" + j, horizontal+((j+1)*100),vertical); ObjectSetText("infolabel" + j, timeText[j], fontsize, font, Pink); 表示("infolabel2" + 記号 + ((j+1)*columnspacing), horizontal+((j+1)*100),vertical +((i+1)*18)); ObjectSetText("infolabel" + j, timeText[j], fontize, font, Pink); ObjectSetText("infolabel2" +symbol+ ((j+1)*columnspacing), infolabel , fontsize, font, fontcolor).を表示します。 } } //---- return(0); } void Display(文字列名, int x, int y) { ObjectCreate(name, OBJ_LABEL, 0, 0, 0); ObjectCreate(name, OBJ_LABEL, 0, 0, 0); ObjectSet(name, OBJPROP_CORNER, 0); ObjectSet(name, OBJPROP_CORNER, 0); ObjectSet(name, OBJPROP_XDISTANCE, x); ObjectSet(name, OBJPROP_XDISTANCE, x); ObjectSet(name, OBJPROP_YDISTANCE, y); ObjectSet(name, OBJPROP_XDISTANCE, x); ObjectSet(name, OBJPROP_BACK, FALSE); } AtApi 2015.05.28 02:52 #4769 こんにちは、私は小さな要求を持っている...私はテキストファイルから読み、文字列配列にその値を返す関数を 記述しようとしてきた...テキストファイルはいくつかの行によって形成され、それらの各々は、ペアの合計数である最初の行を除いて、ペア名です。 例えば 7 CADJPY CHFJPY EURJPY GBPJPY NZDJPY USDJPY AUDJPY metaquotesのサイトで次のコードを見つけたのですが、行き詰まってしまいました。文字列の配列を作り、テキストの最初の行を読んだ後、この値にサイズを変更して、ペアの名前でそれを埋めたいのですが、誰か助けてくれませんか? int handle, NL,i,pos[]; string str,word; handle=FileOpen("test.txt",FILE_READ);//try to open file if(handle==-1)return(0);// if not exist if(FileSize(handle)==0){FileClose(handle); return(0); } //if empty while(!FileIsEnding(handle))//read file to the end by paragraph. if you have only one string, omit it { str=FileReadString(handle);//read one paragraph to the string variable if(str!="")//if string not empty { NL=0; for(i=0;i<StringLen(str);i++) { if(StringGetChar(str,i)==10)// look for newline (Charcode:10) only { NL++;//yes, we found one more newline ArrayResize(pos,NL);//increase array pos[NL-1]=i;//write the number of newline position to array } }//now we have array with numbers of positions of all newline for(i=0;i<=NL;i++)//start to read elements of string { if(i==0) word=StringSubstr(str,0,pos[0]);//the first element of string (in this case is the number 7) else word=StringSubstr(str,pos+1,pos-pos-1); } } } FileClose(handle); //close file return(0); Coding help need a little help Reading from TXT file yinyang88 2015.05.28 06:18 #4770 download38: こんにちは、マスターコーダーです。PPO_altというインディケータを作ろうとしたのですが、写真a,bのプロット1が、リアルタイムモードでは正しく描画されません。 そこで、オリジナルのPPO(プロット2)を修正しようとしたのですが、やはり正しくありません。 どうか見ていただいて、両方を修正していただけないでしょうか。 よろしくお願いします。 PS. 不明な点があれば、また質問してください。 for(i=0; i=0; i--)の違いや使用するタイミングについて、どなたか教えていただけませんか? よろしくお願いします。 1...470471472473474475476477478479480481482483484...786 新しいコメント 取引の機会を逃しています。 無料取引アプリ 8千を超えるシグナルをコピー 金融ニュースで金融マーケットを探索 新規登録 ログイン スペースを含まないラテン文字 このメールにパスワードが送信されます エラーが発生しました Googleでログイン WebサイトポリシーおよびMQL5.COM利用規約に同意します。 新規登録 MQL5.com WebサイトへのログインにCookieの使用を許可します。 ログインするには、ブラウザで必要な設定を有効にしてください。 ログイン/パスワードをお忘れですか? Googleでログイン
こんにちは、マスターコーダーです。
PPO_altインジケータを作ろうとしたのですが、写真a,bのプロット1が、リアルタイムモードでは正しく表示されないのです。
そこで、オリジナルのPPO(プロット2)を修正しようとしたのですが、やはり正しくありません。 どうか見ていただいて、両方を修正していただけないでしょうか。
よろしくお願いします。
PS. 不明な点があれば、また質問してください。
マスターコーダーさん、こんにちは。
PPO_altというインディケータを作ろうとしたのですが、写真a,bのプロット1が、リアルタイムモードでは正しく描画されません。
そこで、オリジナルのPPO(プロット2)を修正しようとしたのですが、やはり正しくありません。 どうか見ていただいて、両方を修正していただけないでしょうか。
よろしくお願いします。
追記です。 不明な点があれば、また質問してください。なぜ、2つのループで全く同じことをするのですか?
こんにちはMladen
ヘルプが必要です
ライブクォートを取得しないヘルプをお願いします
//+------------------------------------------------------------------+
//| エキスパート初期化関数
//+------------------------------------------------------------------+
#property indicator_chart_window
double ExtMapBuffer1[];
extern int RSI_periode = 14;
extern int RSI_level = 50;
extern color BuyColor = clrLime;
extern color SellColor = clrRed; extern color BuyColor = clrLime; extern color SellColor = clrRed;
extern int horizontal = 20;
extern int vertical = 50;
extern int shift = 1;
extern double percent = 0.25;
extern string fontmode = "Arial";
extern int fontsize = 10;
extern color fontcolor = clrSkyBlue;
extern int columnspacing = 100;
int init()
{
//----
SetIndexStyle(0,DRAW_LINE)を設定します。
SetIndexBuffer(0,ExtMapBuffer1)を設定します.
//----
return(0);
}
//+------------------------------------------------------------------+
//| エキスパートによる初期化関数
//+------------------------------------------------------------------+
int deinit()
{
//----
ObjectsDeleteAll();
ObjectDelete("INFO");
//----
return(0);
}
//+------------------------------------------------------------------+
//| エキスパートスタート機能
//+------------------------------------------------------------------+
int start()
{
//----
string symlist2[] = {"NIFTY", "B.NIFTY", "XAUUSD", "GOLD"};
文字列シンボル
string info2[] = {MODE_HIGH,MODE_LOW,MODE_BID,MODE_ASK}; string info2[] = {MODE_HIGH,MODE_LOW,MODE_BID,MODE_ASK};
string infolabel;
string timeText[] = {"DayHigh", "DayLow", "Bid", "Ask"};
string font = "ターミナル";
int counted_bars=IndicatorCounted();
int symlimit = ArraySize(symlist2);
int timelimit = ArraySize(info2); int timelimit = ArraySize(info2);
for(int i=0;i<symlimit;i++)
{
symbol = symlist2;
Display("symlabel" + symbol + i, horizontal,vertical);
ObjectSetText("symlabel" + symbol + i, "SYMBOL", fontsize, font, Pink).ObjectSetText("sym" + symbol + i, "SYMBOL", fontsize, font, Pink);
表示("sym" + symbol + i, horizontal,vertical +((i+1)*18));
ObjectSetText("sym" + symbol + i, "" + symbol + "", fontsize, font, Yellow)を実行します。
for(int j=0;j<timelimit;j++)
{
infolabel = info2[j];
表示("infolabel" + j, horizontal+((j+1)*100),vertical);
ObjectSetText("infolabel" + j, timeText[j], fontsize, font, Pink);
表示("infolabel2" + 記号 + ((j+1)*columnspacing), horizontal+((j+1)*100),vertical +((i+1)*18)); ObjectSetText("infolabel" + j, timeText[j], fontize, font, Pink);
ObjectSetText("infolabel2" +symbol+ ((j+1)*columnspacing), infolabel , fontsize, font, fontcolor).を表示します。
}
}
//----
return(0);
}
void Display(文字列名, int x, int y)
{
ObjectCreate(name,OBJ_LABEL, 0, 0, 0); ObjectCreate(name,OBJ_LABEL, 0, 0, 0);
ObjectSet(name, OBJPROP_CORNER, 0); ObjectSet(name, OBJPROP_CORNER, 0);
ObjectSet(name, OBJPROP_XDISTANCE, x); ObjectSet(name, OBJPROP_XDISTANCE, x);
ObjectSet(name, OBJPROP_YDISTANCE, y); ObjectSet(name, OBJPROP_XDISTANCE, x);
ObjectSet(name, OBJPROP_BACK, FALSE);
}
なぜ2つのループで全く同じことをするのですか?
ああ、私はただ見やすいように点をつけて線をプロットしたいだけなのです。
重要な 線は、私が問題にしているmultihighです。
ご質問ありがとうございます。
"Close BUY" と "Close SELL" のアルゴリズム
こんにちは、プロコーダーズです。
クローズBUY」と「クローズSELL」アルゴリズムについて、どなたかレビューしていただけないでしょうか?
EAはストップロスや トレンドの変化が起こった後、新しいポジションを開くことはありません。
システムはポジションを閉じているだけで、次のポジションは新しいトレンドの変化で開かれ、それは機会損失につながります。
(スクリーンショットをご覧ください)。
void CheckForClose()
{
RefreshRates();
double cl_diCustom0 = iCustom(s_symbol,TenkanKijunTf, "Tenkan Sen-Kijun Sen",0,Tenkan,Kijun,0,bar);
double cl_diCustom1 = iCustom(s_symbol,TenkanKijunTf, "Tenkan Sen-Kijun Sen",0,Tenkan,Kijun,1,bar); double cl_diCustom1 = iCustom(s_symbol,TenkanKijunTf,Tenkan-Kijun Sen",0,Tenkan,Kijun,1,bar)
double cl_diCustom2 = iCustom(s_symbol,TenkanKijunTf, "Tenkan Sen-Kijun Sen",0,Tenkan,Kijun,1,bar);
double cl_diCustom3 = iCustom(s_symbol,TenkanKijunTf, "Tenkan Sen-Kijun Sen",0,Tenkan,Kijun,1,bar+1); double cl_diCustom3 = iCustom(s_symbol,TenkanKijunTf,Tenkan-Kijun Sen,1,bar+1);
double cl_diMA3 = iMA(s_symbol,MaTimeframe,MaPeriod,0,MaType,PRICE_CLOSE,bar)。
double cl_diMA4 = iMA(s_symbol,MaTimeframe,MaPeriod,0,MaType,PRICE_CLOSE,bar+1); double cl_diMA4 = iMA(s_symbol,MaTimeframe,MaPeriod,0,MaType,PRICE_CLOSE,bar+1);
for(int i=0;i<OrdersTotal(); i++)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false) break;
if(OrderMagicNumber()!=MAGIC)を続ける。
if(OrderSymbol() != s_symbol) continue; if(OrderSymbol() != s_symbol) continue;
//+------------+
//|終値買|||||終値買
//+------------+
if(cl_diCustom0!=cl_diCustom1) //トレンドチェック
{
if(OrderType()==OP_BUY)の場合。
{
if(cl_diCustom0<cl_diCustom1 && cl_diCustom2=cl_diMA4)
{
bool buyClose=OrderClose(OrderTicket(),OrderLots(),MarketInfo(s_symbol,MODE_BID),Slippage*pipMultiplier,clCloseBuy);
if(buyClose==false)
{
int ErrorCode = GetLastError();
文字列ErrDesc = ErrorDescription(ErrorCode);
string ErrAlert= StringConcatenate("買い注文を閉じる - Error ",ErrorCode,": ",ErrDesc);
if(ShowAlerts == true) アラート(ErrAlert);
string ErrLog=StringConcatenate("Bid:",MarketInfo(s_symbol,MODE_BID)," Lots:",OrderLots()," Ticket:",OrderTicket());
Print(ErrLog)を実行します。
ブレーク
// 修正
}
//+-------------+
//| 売りを閉じる
//+-------------+
if(cl_diCustom0!=cl_diCustom1)
{
if(オーダータイプ()==OP_SELL)
{
if(cl_diCustom0>cl_diCustom1 && cl_diCustom2>cl_diMA3 && cl_diCustom3<=cl_diMA4)
{
bool sellClose= OrderClose(OrderTicket(),OrderLots(),MarketInfo(s_symbol,MODE_ASK),Slippage*pipMultiplier,clcloseSell);
if(sellClose == false)
{
ErrorCode = GetLastError();
ErrDesc = ErrorDescription(ErrorCode)。
ErrAlert=StringConcatenate("Close Sell Order - Error ",ErrorCode,": ",ErrDesc);
if(ShowAlerts==true) アラート(ErrAlert);
ErrLog=StringConcatenate("アスク:",MarketInfo(s_symbol,MODE_ASK)," Lots:",OrderLots()," Ticket:",OrderTicket());
Print(ErrLog);
ブレーク
// 修正
}
}
}
}
こんにちは、Pro-Codersです。
クローズBUY」と「クローズSELL」のアルゴリズムについて、どなたかレビューしていただけないでしょうか?
EAはストップロスやトレンドの変化が起こった後、新しいポジションをオープンしません。
システムはただポジションを閉じているだけで、次のポジションは新しいトレンドの変化で開かれるため、機会損失につながります。
(スクリーンショットをご覧ください)
これを変更します。
for(int i=0;i<OrdersTotal(); i++)
を次のように変更します。
for(int i=OrdersTotal()-1;i>=0 ; i--) に変更します。
多分、特定のメタトレーダーのビルドの問題だと思います。
私のビルド765
Pruchikはこのバージョンをここで提供しました。
https://www.mql5.com/en/forum/173588
しかし、Gann sq9 インジケータがチャート上に線を残して変更された場合、その線を削除するための追加スクリプトが必要です。
この表示情報の問題を解決するには............。
こんにちは、Mladen & All senior Codderです。
このディスプレイ情報の問題を解決する必要があります。
ライブ見積もりを取得しないヘルプしてください
//+------------------------------------------------------------------+
//| エキスパート初期化機能
//+------------------------------------------------------------------+
#property indicator_chart_window
double ExtMapBuffer1[];
extern int RSI_periode = 14;
extern int RSI_level = 50;
extern color BuyColor = clrLime;
extern color SellColor = clrRed; extern color BuyColor = clrLime; extern color SellColor = clrRed;
extern int horizontal = 20;
extern int vertical = 50;
extern int shift = 1;
extern double percent = 0.25;
extern string fontmode = "Arial";
extern int fontsize = 10;
extern color fontcolor = clrSkyBlue;
extern int columnspacing = 100;
int init()
{
//----
SetIndexStyle(0,DRAW_LINE)を設定します。
SetIndexBuffer(0,ExtMapBuffer1)を設定します.
//----
return(0);
}
//+------------------------------------------------------------------+
//| エキスパートによる初期化関数
//+------------------------------------------------------------------+
int deinit()
{
//----
ObjectsDeleteAll();
ObjectDelete("INFO");
//----
return(0);
}
//+------------------------------------------------------------------+
//| エキスパートスタート機能
//+------------------------------------------------------------------+
int start()
{
//----
string symlist2[] = {"NIFTY", "B.NIFTY", "XAUUSD", "GOLD"};
文字列シンボル
string info2[] = {MODE_HIGH,MODE_LOW,MODE_BID,MODE_ASK}; string info2[] = {MODE_HIGH,MODE_LOW,MODE_BID,MODE_ASK};
string infolabel;
string timeText[] = {"DayHigh", "DayLow", "Bid", "Ask"};
string font = "ターミナル";
int counted_bars=IndicatorCounted();
int symlimit = ArraySize(symlist2);
int timelimit = ArraySize(info2); int timelimit = ArraySize(info2);
for(int i=0;i<symlimit;i++)
{
symbol = symlist2;
Display("symlabel" + symbol + i, horizontal,vertical);
ObjectSetText("symlabel" + symbol + i, "SYMBOL", fontsize, font, Pink).ObjectSetText("sym" + symbol + i, "SYMBOL", fontsize, font, Pink);
表示("sym" + symbol + i, horizontal,vertical +((i+1)*18));
ObjectSetText("sym" + symbol + i, "" + symbol + "", fontsize, font, Yellow)を実行します。
for(int j=0;j<timelimit;j++)
{
infolabel = info2[j];
表示("infolabel" + j, horizontal+((j+1)*100),vertical);
ObjectSetText("infolabel" + j, timeText[j], fontsize, font, Pink);
表示("infolabel2" + 記号 + ((j+1)*columnspacing), horizontal+((j+1)*100),vertical +((i+1)*18)); ObjectSetText("infolabel" + j, timeText[j], fontize, font, Pink);
ObjectSetText("infolabel2" +symbol+ ((j+1)*columnspacing), infolabel , fontsize, font, fontcolor).を表示します。
}
}
//----
return(0);
}
void Display(文字列名, int x, int y)
{
ObjectCreate(name, OBJ_LABEL, 0, 0, 0); ObjectCreate(name, OBJ_LABEL, 0, 0, 0);
ObjectSet(name, OBJPROP_CORNER, 0); ObjectSet(name, OBJPROP_CORNER, 0);
ObjectSet(name, OBJPROP_XDISTANCE, x); ObjectSet(name, OBJPROP_XDISTANCE, x);
ObjectSet(name, OBJPROP_YDISTANCE, y); ObjectSet(name, OBJPROP_XDISTANCE, x);
ObjectSet(name, OBJPROP_BACK, FALSE);
}こんにちは、私は小さな要求を持っている...私はテキストファイルから読み、文字列配列にその値を返す関数を 記述しようとしてきた...テキストファイルはいくつかの行によって形成され、それらの各々は、ペアの合計数である最初の行を除いて、ペア名です。
例えば
7
CADJPY
CHFJPY
EURJPY
GBPJPY
NZDJPY
USDJPY
AUDJPY
metaquotesのサイトで次のコードを見つけたのですが、行き詰まってしまいました。文字列の配列を作り、テキストの最初の行を読んだ後、この値にサイズを変更して、ペアの名前でそれを埋めたいのですが、誰か助けてくれませんか?
int handle, NL,i,pos[];
string str,word;
handle=FileOpen("test.txt",FILE_READ);//try to open file
if(handle==-1)return(0);// if not exist
if(FileSize(handle)==0){FileClose(handle); return(0); } //if empty
while(!FileIsEnding(handle))//read file to the end by paragraph. if you have only one string, omit it
{
str=FileReadString(handle);//read one paragraph to the string variable
if(str!="")//if string not empty
{
NL=0;
for(i=0;i<StringLen(str);i++)
{
if(StringGetChar(str,i)==10)// look for newline (Charcode:10) only
{
NL++;//yes, we found one more newline
ArrayResize(pos,NL);//increase array
pos[NL-1]=i;//write the number of newline position to array
}
}//now we have array with numbers of positions of all newline
for(i=0;i<=NL;i++)//start to read elements of string
{
if(i==0) word=StringSubstr(str,0,pos[0]);//the first element of string (in this case is the number 7)
else word=StringSubstr(str,pos+1,pos-pos-1);
}
}
}
FileClose(handle); //close file
return(0);
こんにちは、マスターコーダーです。
PPO_altというインディケータを作ろうとしたのですが、写真a,bのプロット1が、リアルタイムモードでは正しく描画されません。
そこで、オリジナルのPPO(プロット2)を修正しようとしたのですが、やはり正しくありません。 どうか見ていただいて、両方を修正していただけないでしょうか。
よろしくお願いします。
PS. 不明な点があれば、また質問してください。for(i=0; i=0; i--)の違いや使用するタイミングについて、どなたか教えていただけませんか?
よろしくお願いします。