Handle=iCustom(Symbol(),PERIOD_H1,"_iTrend",10);
//--- Если не удалось получить хендл индикатораif(Handle==INVALID_HANDLE)
{
PrintFormat("Failed to create handle of the iAO indicator for the symbol %s/%s, error code %d",
Symbol(),
EnumToString(Period()),
GetLastError());
//---return(INIT_FAILED);
}
後述
if(CopyBuffer(Handle,0,1,1,Buffer1) <=0 проверка на ошибку
---
в Buffer1[1111] получаем значение
この行だけ疑問
-50 余分なものと配列"0 "の上/下を描画することです。
でも、なくても大丈夫です。要はハンドルの使い方が知りたいんです。
ぜひお勧めします。
そうでない場合は oops が表示されます))
さらに、分割した後、すぐに全体に落とし込む。そうでなければ、2進数のカウントはいろいろなことができる)。
これは、"0 "の上/下に描画するためのものです。
でも、なくても大丈夫です。ハンドルの使い方を知りたいんです。
ハンドルはインジケーターファイルへのポインターで、通常OnInit()で作成されます。
後述
ハンドルはインジケータファイルへのポインタであり、通常OnInit()で作成されます。
後述
ありがとうございます!しかし、ヘルプのようで残念ながら私にはよくわかりません(
そのため、仕事のロジックを理解するために、私のコードをmql5に翻訳するよう依頼しました。
私はこうしています
しかし、何かが間違っているような気がしますし、iMAOnArrayはヘルプに記載されていません。
こんにちは。
マーチンループの問題が解決できない。
マーチンのループの問題が解決できません。実行後:(n>=OrdersClose)-で 切断され、その後、マーチンは有益な取引が発生するまでトリガーさ れないのです。
(n>=OrdersClose)の後にreturn(dLots) が必要で、次のトレードが再び負けた場合、マーティンは再び開始さ れます。
どのようにすればよいか、アドバイスをお願いします。
皆さん、こんにちは!!!
チャート上の平均価格の表示を規定したグリッドアドバイザーのコードで私に助言してください。それはOKでしょうが、正しくグリッドを閉じた後の行を削除しない、つまり、平均価格はありません。 私は間違っていたのか私に教えてください。以下はそのコードと画像です。
//+-----------------------------------------------------------------------------
//| グループ注文の修正|
//+-----------------------------------------------------------------------------
void ModifyOrders(int otype)
{
double avg_price, AveragePriceBuy, AveragePriceSell, order_lots = 0;
price = 0;
for(int i = OrdersTotal()-1; i>)=0; i--)
{
if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
{
if(OrderSymbol() == Symbol() && OrderMagicNumber() == Magic && OrderType() == otype)
{
price += OrderOpenPrice() * OrderLots();
order_lots += OrderLots() ;
}
}
}
。avg_price = NormalizeDouble(price / order_lots, Digits);
AveragePriceBuy = NormalizeDouble(avg_price + Spread, Digits);
AveragePriceSell = NormalizeDouble(avg_price - Spread, Digits)です。
{
ObjectDelete(0, "AveragePriceLine");
ObjectCreate("AveragePriceLine" ,OBJ_HLINE, 0, 0 ,AveragePriceBuy);
。ObjectCreate("AveragePriceLine" ,OBJ_HLINE, 0, 0 ,AveragePriceSell);
ObjectSet("AveragePriceLine",OBJPROP_COLOR,Blue);
▼
▼。if ((otype == OP_BUY) && (Drawdown <= DrawdownClosingTakeprofitZero))
tp = NormalizeDouble (AveragePriceBuy + TakeProfitGroupOrder*Point, Digits);
。if ((otype == OP_SELL) && (Drawdown <= DrawdownClosingTakeprofitZero))
tp = NormalizeDouble (AveragePriceSell-TakeProfitGroupOrder*Point、Digits);
if ((otype == OP_BUY) && (Drawdown > DrawdownClosingTakeprofitZero))
tp = NormalizeDouble (AveragePriceBuy, Digits);
if ((otype == OP_SELL) &/Original)& (Drawdown > DrawdownClosingTakeprofitZero))
tp = NormalizeDouble (AveragePriceSell, Digits);
for(int i = OrdersTotal()-1;i>=0; i--)
{
if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
{
if(OrderSymbol() == Symbol() && OrderMagicNumber() == Magic && OrderType() == otype)
{
if(OrderModify(OrderTicket(), OrderOpenPrice(), 0, tp, 0))
Print("Orders successfully modified!");
else Print("Error modifying orders!");
}
}
}
} }.
皆さん、こんにちは!!!
チャート上の平均価格の表示を規定したグリッドアドバイザーのコードで私に助言してください。私はOKだろうが、正しくグリッドを閉じた後に行を削除しない、つまり、平均価格はありません。 私は間違っていたのか私に教えてください。以下はそのコードと画像です。
このように試してみてください。
あるいは、より良い処方をする。
売りの注文がない場合、売りの行を削除します。
ばいきんまんにも
こんばんは、グラフィックボタンをクリックしたときに、もう一度クリックするまでずっと押されていない状態にリセットするにはどうしたらいいのでしょうか?