移動平均のエキスパート - ページ 2

 
lomme:
SLが3回連続で当たると、もうだめです。 本物のお金では、カジノでギャンブルをするようなものです。

3つのSLはどこにあるのですか?

 

声明文更新!

もしかしたら、現象かもしれない!

4時間で100USDが315USDに!

ファイル:
screen.jpg  131 kb
 
codersguru:
3 SLはどこだ?

...将来的には、待ちます。

 

ステートメント更新!

私の利益は144 まで落ちました、私は今利益保護コードを書いています!

ファイル:
 

いつものように

いつものようにそれが起こる

私のEAの例で言うと

5時間から9時間くらいはいい感じだったんだけど、それ以降は利益が少なくなり、損失が大きくなった。

もう利益は出尽くしたと思う。

 

プロフィットプロテクター

これが私のプロフィットプロテクターのコードです。

extern bool ProtectProfit= true;

extern double ProfitToProtect = 150;

int start()

{

...

if(ProtectProfit)

ProfitProtect(ProfitToProtect);

....

}

void ProfitProtect(double profit)

{

int total = OrdersTotal();

double MyCurrentProfit=0;

for (int cnt = 0 ; cnt < total ; cnt++)

{

OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);

if (OrderMagicNumber() == MagicNumber)

MyCurrentProfit += OrderProfit();

}

Print("My Current Profit is : " + DoubleToStr(MyCurrentProfit,2) + " While My Profit Target is " + DoubleToStr(profit,2));

if(MyCurrentProfit>=profit)

CloseAll();

}

void CloseAll()

{

int total = OrdersTotal();

for (int cnt = 0 ; cnt < total ; cnt++)

{

OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);

if (OrderMagicNumber() == MagicNumber)

if(OrderType()==OP_BUY)

OrderClose(OrderTicket(),OrderLots(),Bid,Slippage,Violet);

if(OrderType()==OP_SELL)

OrderClose(OrderTicket(),OrderLots(),Ask,Slippage,Violet);

}

}
 

ロスプロテクター!?

lomme:
...未来で、待ってる。

ロスプロテクターも 書ける!

 
mj10:
いつものようにそれが起こる

私のEAの例で言うと

このEAは、5時間から9時間の間、良いパフォーマンスを発揮し、その後、利益は少なくなり、損失は大きくなりました。

私は今、利益が を超えていると思います。

、それは単に取引が何であるかであるので、そのために泣かないでください

というのも、それがトレードだからです。

 
codersguru:
これが私のプロフィットプロテクターのコードです。
extern bool ProtectProfit= true;

extern double ProfitToProtect = 150;

int start()

{

...

if(ProtectProfit)

ProfitProtect(ProfitToProtect);

....

}

void ProfitProtect(double profit)

{

int total = OrdersTotal();

double MyCurrentProfit=0;

for (int cnt = 0 ; cnt < total ; cnt++)

{

OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);

if (OrderMagicNumber() == MagicNumber)

MyCurrentProfit += OrderProfit();

}

Print("My Current Profit is : " + DoubleToStr(MyCurrentProfit,2) + " While My Profit Target is " + DoubleToStr(profit,2));

if(MyCurrentProfit>=profit)

CloseAll();

}

void CloseAll()

{

int total = OrdersTotal();

for (int cnt = 0 ; cnt < total ; cnt++)

{

OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);

if (OrderMagicNumber() == MagicNumber)

if(OrderType()==OP_BUY)

OrderClose(OrderTicket(),OrderLots(),Bid,Slippage,Violet);

if(OrderType()==OP_SELL)

OrderClose(OrderTicket(),OrderLots(),Ask,Slippage,Violet);

}

}

プロフィットプロテクトレベルを150USDに設定したので、(オジャラ)ゲットだぜ!

5時間で100USDから150USDって、なにそれ?

 

こんにちは、codersguruです。MagicNumberという変数は どのように定義しているのでしょうか?つまり、ある種のグローバル変数の定義ですか?ありがとうございます。