読み取り専用

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

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

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

ご参加ください Discord YouTube

Trade Contextは忙しいです。その理由がわかりましたが、解決策が必要です。

8件の返信

タワダ

サブスクライバー、bpb_participant、コミュニティ、course_strategyquant-x-course、回答数 92件。.

プロフィールを表示

10年前 #115012

ok first let me explain what im trying to do so you all know what im missing 

 

my expert will open a trade based on my strategy at 9.00AM everyday

 

and since it only open 1 trade a day , i decided to run the expert on 15 charts

 

when it is 9.00am , some of the trades get open and some get “Trade Context is busy” error

 

i know this is happening because im sending too much orders to the server

 

how can i avoid that ?

 

i have 8 Trading Rules

 

qWNkyGX.png

 

何かアイデアはありますか?

0

Tomas Matejka

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

プロフィールを表示

10年前 #136460

こんにちは,

 

you could edit the final code and place the following code just before an order is placed / closed to prevent this error, while still executing the trade / exit.

while(IsTradeContextBusy()) Sleep(100);
RefreshRates();

0

タワダ

サブスクライバー、bpb_participant、コミュニティ、course_strategyquant-x-course、回答数 92件。.

プロフィールを表示

10年前 #136464

こんにちは,

you could edit the final code and place the following code just before an order is placed / closed to prevent this error, while still executing the trade / exit.

while(IsTradeContextBusy()) Sleep(100);
RefreshRates();

thank you for your reply.

shall i put the code before the order execution only or before & after ?

0

Tomas Matejka

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

プロフィールを表示

10年前 #136465

it should be fine place only before

0

タワダ

サブスクライバー、bpb_participant、コミュニティ、course_strategyquant-x-course、回答数 92件。.

プロフィールを表示

10年前 #136468

here is an example , is that the right place to put the code in ?  😆

   // test 
   while(IsTradeContextBusy()) Sleep(100);
   RefreshRates();
   if(sqIsBarOpen == true) {
      if ((Close[1] > iSAR(NULL, 0 , 0.02 , 0.2 , 1)))
      {
      sqOpenOrder("NULL", OP_BUY, getOrderSize(1000, OP_BUY ), getOrderPrice(1000), "", 1000, "test");
      }
   }

   return(0);
}

0

Tomas Matejka

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

プロフィールを表示

10年前 #136486

yes, this should work. It can be also placed into the body of bool sqOpenOrder() function which is bit lower right behind

bool sqOpenOrder(string symbol, int orderType, double orderLots, double price......

because you always call this function to create an order from multiple conditions

0

タワダ

サブスクライバー、bpb_participant、コミュニティ、course_strategyquant-x-course、回答数 92件。.

プロフィールを表示

10年前 #136495

yes, this should work. It can be also placed into the body of bool sqOpenOrder() function which is bit lower right behind

bool sqOpenOrder(string symbol, int orderType, double orderLots, double price......

because you always call this function to create an order from multiple conditions

still having the same problem
im thinking of adding time delay after each order (lets say 2 seconds) , the problem is that the ea will use the same 2 seconds on each chart. so I’ll get the same problem again because im using 15 charts

any ideas to implement random delay after each order ? (from 1 up to 15 seconds , its ok)

0

タワダ

サブスクライバー、bpb_participant、コミュニティ、course_strategyquant-x-course、回答数 92件。.

プロフィールを表示

10年前 #136502

hello ……. it’s me

0

Tomas Matejka

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

プロフィールを表示

10年前 #136522

こんにちは,

 

you can try to play with Sleep value or try another method and wrap the code like this (using if (IsTradeAllowed())

if(IsTradeAllowed())
   if(sqIsBarOpen == true) {
      if ((Close[1] > iSAR(NULL, 0 , 0.02 , 0.2 , 1))) {
          sqOpenOrder("NULL", OP_BUY, getOrderSize(1000, OP_BUY ), getOrderPrice(1000), "", 1000, "test");
      }
   }
}

0

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