読み取り専用

フォーラムは現在、読み取り専用のアーカイブとなっています。.

バグ報告やプラットフォームに関する質問はこちら → [email protected]

私たちのコミュニティはDiscordとYouTubeで活動しています。ぜひ参加してください!

ご参加ください Discord YouTube

EA WizardでOCO(One-Cancel-Other)ルールを設定する方法.

2件の返信

おどみけ

登録者、bbp_participant、コミュニティ、32件の返信。.

プロフィールを表示

12年前 #112086

こんにちは、,

 

I am trying to create an EA that places pending orders but will delete one order once the other is hit by price. For instance, EA places a buy and sell stop, at a certain time, the buy stop is hit and EA automatically closes the sell stop and keeps managing the buy stop order till close of the trade.

 

I have looked through the それから rule of pending orders and noticed a parameter there Replace Existing Order: True/False, but this does not exactly do what I want as it is only meant to replace existing pending orders with same magic number (correct me if I am wrong).

 

I have created a simple boolean rule which I believe should be able to handle what I want if integrated into my more complex EA strategy, but I want to make sure that it can handle it. It closes all pending sell stop orders when any of the pending buy orders are hit and vice-versa. I want it to delete the pending orders when the corresponding one in opposite direction is hit. Like … Pending Buy Stop 1 is hit, Close Pending Sell Stop 1. Should I separate everything into different rules or is there a way for me to integrate all into one single rule?

 

Attached is the strategy file for educational purposes. Anyone can modify and improve on it.

 

Mark please check my strategy and tell me if it is correct and possibly post the corrected version for me.

 

ありがとう。.

 

Michael

ファイル OCO test.sqw

0

マーク・フリック

管理者、sq-ultimate、2件の返信.

プロフィールを表示

12年前 #124219

Hello Michael,

 

I checked the script and simplified it. There’s no need to check for OCO is True 3 times in the condition, I was also not sure about bracketing there.

 

Otherwise the idea is correct. If any of the long pending orders is filled it will cancel the short orders and vice versa.

 

ファイル OCO test.sqw

マーク
StrategyQuantアーキテクト

0

おどみけ

登録者、bbp_participant、コミュニティ、32件の返信。.

プロフィールを表示

12年前 #124268

Wow Mark, I didn’t know that I could use just one bracket for multiple rules like that. That for the correction and support. I appreciate lots. Now I have to integrate this into my News Trading EA which I am creating with the help of EA Wizard.

 

Thanks once again.

0

2件の返信を表示中 - 1 - 2件目 (全2件中)