半分の区画を閉鎖する。 - ページ 9

 
DomGilberto:
そうなんだ - 文字通り、forループを削除したときにそれがわかったんだ。もし、最初に選択されたときからOrderTicket番号を追跡し、OrderCloseがその役割を果たし、それがtrueを返したら、OrderTicket番号が異なるので、これを確認できるというのは正しいですか? - したがって、ループを中断して、別の新しい注文が来るのを待ちます。

どう書けばいいのかよくわからないのですが、だいたいこの線で合っていますか?


注文の残りの部分に新しいチケット番号がない限り、ループを終了する必要はありません。

この情報を変数や配列に保存することの問題は、EAが意図的に停止したり、MT4がクラッシュした場合、情報が失われ、中断したところから再開することができないことです。 マジックナンバーで何とかできるかもしれませんが、そうでなければ、面倒なことに、情報をファイルに保存し始めなければならないでしょう。. .

 

うーん...。さて、OrderClose==trueの後の注文明細をプリントアウトしてみました...。オーダーチケットの番号は、私が最初に取引を開始したときから、半分を決済した後まで同じです。なぜ、Bid が >= exit price になった時点で、同様に半値決済しないのか、何か心当たりはありませんか?十分行きそうなのですが、引き際にしか決済しないようです(早速、既知の設定でテストを繰り返しています。)

2013.08.02 15:50:27     2013.01.31 07:00  trendfishing_play_ground EURUSD,H1: Half Closed Order Details:- Lots Remaining Open: 0.17 Closing Price was: 1.3557 Magic Number is: 1234 Order Ticket Number: 7
2013.08.02 15:50:27     2013.01.31 07:00  trendfishing_play_ground EURUSD,H1: close #7 buy 0.17 EURUSD at 1.34916 sl: 1.35128 tp: 1.36117 at price 1.35566
2013.08.02 15:50:27     2013.01.31 07:00  trendfishing_play_ground EURUSD,H1: Bid >= FirstTarget_Buy - Current Bid: 1.35566 FirstTarget_Buy: 1.35517
2013.08.02 15:50:27     2013.01.31 07:00  trendfishing_play_ground EURUSD,H1: Current Bid: 1.35566 FirstTarget_Buy: 1.35517
2013.08.02 15:50:27     2013.01.31 07:00  trendfishing_play_ground EURUSD,H1: FirstTarget_Buy: 1.35517
2013.08.02 15:50:27     2013.01.31 07:00  trendfishing_play_ground EURUSD,H1: Order Lots Open = 0.33
2013.08.02 15:50:27     2013.01.31 07:00  trendfishing_play_ground EURUSD,H1: Order Ticker Number = 7
2013.08.02 15:50:27     2013.01.31 07:00  trendfishing_play_ground EURUSD,H1: The Lots to close is: 0.17000
2013.08.02 15:50:27     2013.01.31 07:00  trendfishing_play_ground EURUSD,H1: The Lotstep is: 0.01000
2013.08.02 15:50:27     2013.01.31 07:00  trendfishing_play_ground EURUSD,H1:  Checking Buy Order:- Lots to open: 0.33 Entry Price: 1.3492 Buy Stop Loss: 1.3513 Buy Take Profit: 1.3612 Magic Number is: 1234 Order Ticket Number: 7

同じチケット番号なら、連続して半値決済しようとするのを止めるにはどうしたらいいでしょうか?ただ、一度だけ半分を閉じるようにしたいのですが・・・。

 
DomGilberto:

うーん...。さて、OrderClose==trueの後の注文明細をプリントアウトしてみました...。オーダーチケットの番号は、私が最初に取引を開始したときから、半分を決済した後まで同じです。なぜ、Bid が >= exit price になった時点で、同様に半値決済しないのか、何か心当たりはありませんか?十分行きそうなのですが、プルバックでしかクローズしないようです(既知のセットアップでさっそくテストを繰り返しています。)

ログやジャーナルをもう少し見せてもらえますか、注文の半分が閉じられる前のティックのBidは何ですか? 印刷されたものからわかるのは、注文の半分が閉じられようとしたときのBidだけです。 ストラテジーテスターの モードはどのようなものですか。

 
DomGilberto:


同じチケット番号なら、連続で半分ずつ閉じるのをやめたいのですが、どうしたらいいでしょうか?一度だけ半分を閉じるようにしたいのですが...。

よくわかりません、今まで考えたこともないので。おそらくマジックナンバーを使った何か、EAに関連するbsseマジックナンバーと、その日に発注された注文の 3桁を追加して、注文履歴でMNが一致するクローズトレードがあるかどうかを見るか、クローズトレードのOrderOpenTime()を見て、オープントレードに一致させるか、この場合はすでに一部がクローズされています・・・よくわからないので、いくつか考えて実験する必要があります・・・誰かがすでに実証済みの方法を持っていないかどうか・・・・・・・?
 



"if(OpenOrdersThisPair(Symbol())==0)"

これは、一度に1つの注文しか入れられない...。これを削除 すると、1つの設定で市場に投入される取引の数は無制限になります...私は、どのように私は任意のONE孤立したセットアップのアイデアに2〜3〜4注文を許可することができますについての経験を持っていることを期待しています?

私は、1つのトレードセットアップにつき最大4つの出口を持つことができます。

 
DomGilberto:
OK - さて、唯一の他の選択肢は、2つの異なる終了価格で2つの注文を入れることです... 私がそれについて持っている唯一の問題はこれです。

"if(OpenOrdersThisPair(Symbol())==0)"

それは一度に1つのオーダーしか 出せない...それを削除すると、1つの設定で無制限の数の取引が市場に投入されることになる...私は、どのように私は任意のONE孤立したセットアップのアイデアで2-3-4注文を許可することができますについての経験を持っていることを期待している?
if(OpenOrdersThisPair(Symbol()) < 2)
は、最大2つの注文を許可します。
 
RaptorUK:

ログ/ジャーナルをもう少し見せてください。

お願いします ... ...
 
RaptorUK:

注文の半分が閉じられる 前のビッドは何 ですか? 印刷されたものからわかるのは、注文の半分が閉じられようとしたときのビッドだけです。 ストラテジーテスターのモードはどのようなものですか。


私は毎ティックで 使用しています。上のハイライト部分、どうやって確認するのですか?なぜかわからないのですが、すべてが印刷されないことがあります。本当に悔しいです、混乱します。しかし、気にしないでください、プリントアウトは私が上に貼り付けたものとほぼ同じです?

ただ一つ違うのは、"OrderModify error 1 "が容赦なく出てくることです - これはまだ解明できていません...
 
DomGilberto:

ティックごとに使用しています。上記のハイライトされた部分ですが、どのように確認すればよいのでしょうか?なぜかわからないのですが、すべてがプリントアウトされないことがあります。本当に悔しいです、混乱します。でも、気にしないでください、プリントアウトは上に貼り付けたものがほとんどです?

ジャーナルタブではなくログファイルを見てください、タブは多くの印刷があるときにしばしばものを見落としますが、ログファイルはそれらすべてを捕らえます ... ...
 
16:50:26 2013.02.05 11:00  trendfishing_play_ground EURUSD,H1: The minimum lots are: 0.01000
16:50:26 2013.02.05 11:00  trendfishing_play_ground EURUSD,H1: The Lotstep is: 0.01000
16:50:26 2013.02.05 11:00  trendfishing_play_ground EURUSD,H1: The Lots to close is: 0.10000
16:50:26 2013.02.05 11:00  trendfishing_play_ground EURUSD,H1: Order Ticker Number = 17
16:50:26 2013.02.05 11:00  trendfishing_play_ground EURUSD,H1: Order Lots Open = 0.2
16:50:26 2013.02.05 11:00  trendfishing_play_ground EURUSD,H1: FirstTarget_Buy: 1.33594
16:50:26 2013.02.05 11:00  trendfishing_play_ground EURUSD,H1: Current Bid: 1.35452 FirstTarget_Buy: 1.33594
16:50:26 2013.02.05 11:00  trendfishing_play_ground EURUSD,H1: Stop loss value for the order is 1.3555
16:50:26 2013.02.05 11:00  trendfishing_play_ground EURUSD,H1: delete #17 sell stop 0.20 EURUSD at 1.34573 sl: 1.35553 tp: 1.32614 ok
16:50:26 2013.02.05 11:00  trendfishing_play_ground EURUSD,H1: open #18 sell stop 0.20 EURUSD at 1.34573 sl: 1.35549 tp: 1.32620 ok
16:50:26 2013.02.05 12:00  trendfishing_play_ground EURUSD,H1: The minimum lots are: 0.01000
16:50:26 2013.02.05 12:00  trendfishing_play_ground EURUSD,H1: The Lotstep is: 0.01000
16:50:26 2013.02.05 12:00  trendfishing_play_ground EURUSD,H1: The Lots to close is: 0.10000
16:50:26 2013.02.05 12:00  trendfishing_play_ground EURUSD,H1: Order Ticker Number = 18
16:50:26 2013.02.05 12:00  trendfishing_play_ground EURUSD,H1: Order Lots Open = 0.2
16:50:26 2013.02.05 12:00  trendfishing_play_ground EURUSD,H1: FirstTarget_Buy: 1.33597
16:50:26 2013.02.05 12:00  trendfishing_play_ground EURUSD,H1: Current Bid: 1.35544 FirstTarget_Buy: 1.33597
16:50:26 2013.02.05 12:00  trendfishing_play_ground EURUSD,H1:  Stop loss value for the order is 1.3555
16:50:26 2013.02.05 12:00  trendfishing_play_ground EURUSD,H1: delete #18 sell stop 0.20 EURUSD at 1.34573 sl: 1.35549 tp: 1.32620 ok
16:50:26 2013.02.05 12:00  trendfishing_play_ground EURUSD,H1: open #19 sell stop 0.20 EURUSD at 1.34573 sl: 1.35549 tp: 1.32621 ok
16:50:27 2013.02.05 13:00  trendfishing_play_ground EURUSD,H1: The minimum lots are: 0.01000
16:50:27 2013.02.05 13:00  trendfishing_play_ground EURUSD,H1: The Lotstep is: 0.01000
16:50:27 2013.02.05 13:00  trendfishing_play_ground EURUSD,H1: The Lots to close is: 0.10000
16:50:27 2013.02.05 13:00  trendfishing_play_ground EURUSD,H1: Order Ticker Number = 19
16:50:27 2013.02.05 13:00  trendfishing_play_ground EURUSD,H1: Order Lots Open = 0.2
16:50:27 2013.02.05 13:00  trendfishing_play_ground EURUSD,H1: FirstTarget_Buy: 1.33597
16:50:27 2013.02.05 13:00  trendfishing_play_ground EURUSD,H1: Current Bid: 1.35421 FirstTarget_Buy: 1.33597
16:50:27 2013.02.05 13:00  trendfishing_play_ground EURUSD,H1:  Stop loss value for the order is 1.3555
16:50:27 2013.02.05 13:00  trendfishing_play_ground EURUSD,H1: delete #19 sell stop 0.20 EURUSD at 1.34573 sl: 1.35549 tp: 1.32621 ok
16:50:27 2013.02.05 13:00  trendfishing_play_ground EURUSD,H1: open #20 sell stop 0.20 EURUSD at 1.34573 sl: 1.35545 tp: 1.32629 ok
16:50:27 2013.02.05 14:00  trendfishing_play_ground EURUSD,H1: The minimum lots are: 0.01000
16:50:27 2013.02.05 14:00  trendfishing_play_ground EURUSD,H1: The Lotstep is: 0.01000
16:50:27 2013.02.05 14:00  trendfishing_play_ground EURUSD,H1: The Lots to close is: 0.10000
16:50:27 2013.02.05 14:00  trendfishing_play_ground EURUSD,H1: Order Ticker Number = 20
16:50:27 2013.02.05 14:00  trendfishing_play_ground EURUSD,H1: Order Lots Open = 0.2
16:50:27 2013.02.05 14:00  trendfishing_play_ground EURUSD,H1: FirstTarget_Buy: 1.33601
16:50:27 2013.02.05 14:00  trendfishing_play_ground EURUSD,H1: Current Bid: 1.35167 FirstTarget_Buy: 1.33601
16:50:27 2013.02.05 14:00  trendfishing_play_ground EURUSD,H1:  Stop loss value for the order is 1.3555
16:50:27 2013.02.05 14:00  trendfishing_play_ground EURUSD,H1: delete #20 sell stop 0.20 EURUSD at 1.34573 sl: 1.35545 tp: 1.32629 ok
16:50:27 2013.02.05 14:00  trendfishing_play_ground EURUSD,H1: open #21 sell stop 0.21 EURUSD at 1.34573 sl: 1.35533 tp: 1.32654 ok
16:50:27 2013.02.05 15:00  trendfishing_play_ground EURUSD,H1: The minimum lots are: 0.01000
16:50:27 2013.02.05 15:00  trendfishing_play_ground EURUSD,H1: The Lotstep is: 0.01000
16:50:27 2013.02.05 15:00  trendfishing_play_ground EURUSD,H1: The Lots to close is: 0.11000
16:50:27 2013.02.05 15:00  trendfishing_play_ground EURUSD,H1: Order Ticker Number = 21
16:50:27 2013.02.05 15:00  trendfishing_play_ground EURUSD,H1: Order Lots Open = 0.21
16:50:27 2013.02.05 15:00  trendfishing_play_ground EURUSD,H1: FirstTarget_Buy: 1.33614
16:50:27 2013.02.05 15:00  trendfishing_play_ground EURUSD,H1: Current Bid: 1.35297 FirstTarget_Buy: 1.33614
16:50:27 2013.02.05 15:00  trendfishing_play_ground EURUSD,H1:  Stop loss value for the order is 1.3553
16:50:27 2013.02.05 15:00  trendfishing_play_ground EURUSD,H1: delete #21 sell stop 0.21 EURUSD at 1.34573 sl: 1.35533 tp: 1.32654 ok
16:50:27 2013.02.05 15:00  trendfishing_play_ground EURUSD,H1: open #22 sell stop 0.21 EURUSD at 1.34573 sl: 1.35525 tp: 1.32669 ok
16:50:27 2013.02.05 16:00  trendfishing_play_ground EURUSD,H1: The minimum lots are: 0.01000
16:50:27 2013.02.05 16:00  trendfishing_play_ground EURUSD,H1: The Lotstep is: 0.01000
16:50:27 2013.02.05 16:00  trendfishing_play_ground EURUSD,H1: The Lots to close is: 0.11000
16:50:27 2013.02.05 16:00  trendfishing_play_ground EURUSD,H1: Order Ticker Number = 22
16:50:27 2013.02.05 16:00  trendfishing_play_ground EURUSD,H1: Order Lots Open = 0.21
16:50:27 2013.02.05 16:00  trendfishing_play_ground EURUSD,H1: FirstTarget_Buy: 1.33621
16:50:27 2013.02.05 16:00  trendfishing_play_ground EURUSD,H1: Current Bid: 1.35273 FirstTarget_Buy: 1.33621
16:50:27 2013.02.05 16:00  trendfishing_play_ground EURUSD,H1: Stop loss value for the order is 1.3553
16:50:27 2013.02.05 16:00  trendfishing_play_ground EURUSD,H1: delete #22 sell stop 0.21 EURUSD at 1.34573 sl: 1.35525 tp: 1.32669 ok
16:50:27 2013.02.05 16:00  trendfishing_play_ground EURUSD,H1: open #23 sell stop 0.21 EURUSD at 1.34573 sl: 1.35517 tp: 1.32686 ok
16:50:27 2013.02.05 17:00  trendfishing_play_ground EURUSD,H1: delete #23 sell stop 0.21 EURUSD at 1.34573 sl: 1.35517 tp: 1.32686 ok