[警告は閉鎖されました!】フォーラムを乱雑にしないために、どんな初心者の質問でも。プロフェッショナルは、通り過ぎないでください。あなたなしでは、どこにも行けない。 - ページ 594

 

私は確率論を取り、統計的に注文の開始が価格から50ピップ以内になる場合は、10ピップの利益を持つ開口部の順序で到達しやすい - もある場合は10ピップのストップロス(でもスプレッドは問題ありません)トレンドの動きは素晴らしいことです...

StepStopに関係なく、ストップロスを追加する。

//+------------------------------------------------------------------+
//|Volfram.mq4|(株)エヌ・ティ・ティ・データ
//| Vova-x@list.ru |
//| |
//+------------------------------------------------------------------+
#property copyright"Vova-x@list.ru"
#プロパティリンク ""
//-----------------------------------------
extern TakeProfit=10;
extern int StepStop=45;
extern double Lots=0.01;
extern bool MoneyManagement=true;
extern inttern MarginPercent=10;
//-------------------------------------------
int level_sell_stop;
int level_buy_stop;

//----------------------------------------------------------
void init()
{
// int minstop=MarketInfo(Symbol(),MODE_STOPLEVEL);
//Print("levelbuy_stop: "+minstop;")
}
//-----------------------------------------------------------
void start()
{
if (!IsTradeAllowed()) return;
level_buy_stop=0;
level_sell_stop=0。
StepingStop()です。
StepingPendings()。
if (TotalBuy ()==0 && TotalBuyStop ()==0) SetBuyStop ();
if (TotalSell()==0 && TotalSellStop()==0) SetSellStop();
Comment("レベル買いストップ=",level_buy_stop*Point,
"閾値", "レベル売りの停止位置=", level_sell_stop*Point)。
}
//---------------------------------------------------------------------------------------------
void StepingStop()
{
if (StepStop<1) return;
int ask, bid, open, stop, x;
ダブル・ロス
for (int i=0; i<OrdersTotal(); i++)
{
if (!OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) break;
if (OrderSymbol()!=Symbol())。
if (OrderType()==OP_BUY)
{
bid=MathRound(Bid/Point)。
open=MathRound(OrderOpenPrice()/Point)。
stop=MathRound(OrderStopLoss()/Point)。
x=(ビッド-オープン)/ステップストップ; x--; x*=ステップストップ。
level_sell_stop=open+x;
if (stop>=open+x)
loss=(open+x)*ポイント。
OrderModify(OrderTicket(),OrderOpenPrice(),loss,OrderTakeProfit(),0,CLR_NONE);
}
if (OrderType()==OP_SELL)
{
ask=MathRound(Ask/Point)。
open=MathRound(OrderOpenPrice()/Point)。
stop=MathRound(OrderStopLoss()/Point)。
x=(open-ask)/StepStop;x--;x*=StepStop。
level_buy_stop=open-x。
if (stop>0 && stop<=open-x)
loss=(open-x)*ポイント。
OrderModify(OrderTicket(),OrderOpenPrice(),loss,OrderTakeProfit(),0,CLR_NONE);
}
}
}
//----------------------------------------------------------------------------
void StepingPendings()
{
int ask, bid, open;
二重価格、損失、利益。
for (int i=0; i<OrdersTotal(); i++)
{
if (!OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) break;
if (OrderSymbol()!=Symbol())。
if (OrderType()==OP_BUYSTOP)
{
if (level_buy_stop==0)
open=MathRound(OrderOpenPrice()/Point)。
if (open<=level_buy_stop)
price=level_buy_stop*ポイント。
loss=price-StepStop*Point。
profit=0; if (TakeProfit>0) profit=price+TakeProfit*Point;
OrderModify(OrderTicket(),price,loss,profit,0,CLR_NONE);
}
if (OrderType()==OP_SELLSTOP)
{
if (level_sell_stop==0)
open=MathRound(OrderOpenPrice()/Point)。
if (open>=level_sell_stop)
price=level_sell_stop*ポイント。
loss=price+StepStop*Pointとなります。
profit=0; if (TakeProfit>0) profit=price-TakeProfit*Point;
OrderModify(OrderTicket(),price,loss,profit,0,CLR_NONE);
}
}
}
//-------------------------------------------------------------------
void SetBuyStop()
{
double lots=LotsCounting()。
double price=Bid+StepStop*Point;
double loss=price-StepStop*Point。
double profit=0; if (TakeProfit>0) profit=price+TakeProfit*Point;
int ticket=OrderSend(Symbol(),OP_BUYSTOP,lots,price,0,loss,profit,"",0,0,CLR_NONE);
if (ticket<1) Print("Set a pending order failed with error #",GetLastError()," ",(GetLastError()).If (ticket<1) Print("GetLastError()","");
}

void SetSellStop()
{
double lots=LotsCounting()。
double price=Ask-StepStop*Point;
double loss=price+StepStop*Point。
double profit=0; if (TakeProfit>0) profit=price-TakeProfit*Point;
int ticket=OrderSend(Symbol(),OP_SELLSTOP,lots,price,0,loss,profit,"",0,0,CLR_NONE);
if (ticket<1) Print("Set a pending order failed with error #",GetLastError()," ",(GetLastError()).If (ticket<1) Print("GetLastError()","");
}


int TotalBuy()
{
int count=0;
for (int i=0; i<OrdersTotal(); i++)
{
if (!OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) break;
if (OrderSymbol()!=Symbol()) continue;
if (OrderType()==OP_BUY) count++;
}
を返す(カウント)。
}

int TotalBuyStop()
{
int count=0;
for (int i=0; i<OrdersTotal(); i++)
{
if (!OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) break;
if (OrderSymbol()!=Symbol()) continue;
if (OrderType()==OP_BUYSTOP) count++;
}
を返す(カウント)。
}

int TotalSell()
{
int count=0;
for (int i=0; i<OrdersTotal(); i++)
{
if (!OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) break;
if (OrderSymbol()!=Symbol()) continue;
if (OrderType()==OP_SELL) count++;
}
を返す(カウント)。
}

int TotalSellStop()
{
int count=0;
for (int i=0; i<OrdersTotal(); i++)
{
if (!OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) break;
if (OrderSymbol()!=Symbol()) continue;
if (OrderType()==OP_SELLSTOP) count++;
}
を返す(カウント)。
}

double LotsCounting()
{
ダブルロット=ロット
if (MoneyManagement)
{
double lotsize=MarketInfo(Symbol(),MODE_LOTSIZE);
double freemargin=AccountFreeMargin()。
lots=0; if (lotsize>0) lots=NormalizeDouble((MarginPercent*freemargin/lotsize),1);
}
if (lots>10) lots=NormalizeDouble(lots,0);
if (lots<0.01) lots=0.01;
を返します(ロット)。
}


// 終了

 
drknn:

返信がないのは、このような指標を書くのは簡単で、不要な場合がほとんどだからだろう。
ありがとうございます、でもどうでしょう?あるいは、端末の 設定で、タイムスケールの全長にわたってアワーマークをより明確に表示することが可能かどうか、教えてください。
 

皆さん、助けてください。取引開始時の最大取引数量を計算することができない

// Расчет максимального объема
   for (double m = 0.1; AccountFreeMarginCheck(Symbol(),OP_SELL,m)>30; m = m + 0.1)
      {
       Max_lots   = m;
       double Ost = AccountFreeMarginCheck(Symbol(),OP_SELL,m);
      }

Max_lotsは常に0です!


そして2つ目の質問ですが、LEVELはどのように算出されるのでしょうか?


 
root:
ありがとう、でもやっぱり?あるいは、端末の設定で、時間軸の全長にわたって時間マーカーをより明確に表示するオプションがあるのかもしれませんが、教えてください。
なるほど、このインジケータがないことが、FXでお金を稼ぐことを阻んでいる最後の要因なんですね。間違いなくそんなものはありませんが、Urainには 8行分の似たようなものがあります。できない場合は、作者に聞いてください、彼はフォーラムにいます。
ファイル:
time_line.mq4  2 kb
 

を簡単に言うと、体積は次のように計算されます。

/* вычитаем средства обозначенные на стопаут c учетом процента риска */
   curBalance = AccountFreeMargin() * (1 - AccountStopoutLevel() / 100.) * percent; // percent - от 0 до 100
/* множитель (1 или 10) зависит от четырех-пятизначности  */
   koeff = iif(DIGITS == 3 || DIGITS == 5, 10, 1);
/* расчет рабочего лота, нормализация */
   lot = NL(curBalance / (koeff * lossPoint * TICKVALUE + MARGINREQUIRED)); //lossPoint - количество пунктов потерь
   if (lot < MINLOT)    lot = 0;
   if (lot > MAXLOT)    lot = MAXLOT;

/* DIGITS,MINLOT,MAXLOT,TICKVALUE,MARGINREQUIRED получаем из Marketinfo() */


とし、レベル=AccountEquity() / AccountFreeMargin() * 100とする。

 
keekkenen:



とし、レベル=AccountEquity() / AccountFreeMargin() * 100とする。

は正しくありません。この方式では、Levelはうまくいきません。
 
Noterday:
正しくない。この計算式は、レベルを計算するものではありません

はい、間違っています。レベル = AccountEquity() /AccountMargin() * 100。

 
keekkenen:

はい、間違っています。レベル = AccountEquity() /AccountMargin() * 100。

ありがとうございます :)
 
こんにちは。みんな、ひとつだけ助けてください。聞いたこともないんだけど......誰か持っていたらどうしよう?選択したすべてのオブジェクトをあるチャートから別のチャートに転送することです。例えば、1つのシンボルの全時間の波形マークアップを1つのウィンドウに転送する必要があるとします。 計算が重いので、マークアップの時間枠切り替えを繰り返すのは難しい(M1で30~50トレンドの計算をすると端末が目立つ-しかも16~24時間程度のチャートで済む)。チャート上のオブジェクト(この場合はトレンドライン)をコピーして、その後にトレンドラインの配列全体を別のウィンドウに転送するスクリプトがあるのかもしれませんね。あるいは、複数のテンプレートを1つのウィンドウにまとめることは可能でしょうか?
 

バタバタしてすみません、今日こそは。

=====

そして、意味のない高さまでスイングする...。

ここから飛んできたフレーズをいくつか・・・。

===========

アンドレイ・ヴォズネセンスキー