กำลังโหลด...
Continue to Myfxbook.com
Continue to Myfxbook.com
ลงชื่อเข้าใช้
ลงทะเบียน
Open an account with FOREX.com
FX Tools:
ปฏิทินเศรษฐกิจ
Interest Rates
FX Calculators
ข่าว
สเปรด
ความเชื่อมั่น
แผนที่ฟอเร็กซ์มาแรง
ความสัมพันธ์
Market Hours
หน้าหลัก
ชุมชน
การเขียนโปรแกรม
Random sleep
แชร์
แชร์หน้านี้!
Edit Your Comment
Random sleep
สมัครสมาชิก
Lugevho17
Jun 01, 2016 at 06:25
436 การดู
2 Replies
Lugevho17
เป็นสมาชิกตั้งแต่ Sep 04, 2014
25 โพสต์
Jun 01, 2016 at 06:25
เป็นสมาชิกตั้งแต่ Sep 04, 2014
25 โพสต์
Hello,
I try to code a random sleep time before opening each trade to avoid opening 2 trades simultaneously when my EA is on multiples charts.
If(OrdersTotal()==0 && condition for buy) {
((Randon sleep here)) //open the trade wich has lowest sleep first, then OrdersTotal()==1, avoid 2nd trade to open.
OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,0,'Trend',1000,0,Green);
}
Could someone help ma please?
Thank you
luclevesque17@
forex_trader_25447
เป็นสมาชิกตั้งแต่ Dec 21, 2010
131 โพสต์
Jun 01, 2016 at 08:47
เป็นสมาชิกตั้งแต่ Dec 21, 2010
131 โพสต์
You can use 'GlobalVariable' :
https://docs.mql4.com/globals
When some EA send order, this variable accept the time of execution.
Each EA can make anything, only after N seconds (and again set this variable).
It is also useful to check IsTradeContextBusy() before execution,
it is possible some EA is already working.
Lugevho17
เป็นสมาชิกตั้งแต่ Sep 04, 2014
25 โพสต์
Jun 03, 2016 at 08:14
เป็นสมาชิกตั้งแต่ Sep 04, 2014
25 โพสต์
Thank you Yvan. I will try with IsTradeContextBusy()
luclevesque17@
ลงชื่อเข้าใช้
/
ลงทะเบียน
to comment
You must be connected to Myfxbook in order to leave a comment
😄
😐
😡
😁
😀
😑
😈
😲
😭
😎
😝
😳
😕
🙄
😞
🙃
😱
😇
😉
😂
*การใช้งานเชิงพาณิชย์และสแปมจะไม่ได้รับการยอมรับ และอาจส่งผลให้บัญชีถูกยกเลิก
เคล็ดลับ: การโพสต์รูปภาพ/youtube url จะฝังลงในโพสต์ของคุณโดยอัตโนมัติ!
เคล็ดลับ: พิมพ์เครื่องหมาย @ เพื่อป้อนชื่อผู้ใช้ที่เข้าร่วมการสนทนานี้โดยอัตโนมัติ
You have an Ad Blocker!
Myfxbook is a site supported by advertisements. Here are two ways for you to continue browsing:
Ad Free Subscription
หรือ
Disable your Ad Blocker
Already subscribed?
ลงชื่อเข้าใช้
คุณไม่ได้เข้าสู่ระบบ
คุณสมบัตินี้มีให้สำหรับสมาชิกที่ลงทะเบียนเท่านั้น
การลงทะเบียนนั้นฟรีและใช้เวลาน้อยกว่าหนึ่งนาที
คลิกปุ่มลงทะเบียนเพื่อดำเนินการต่อ
เว้นแต่คุณจะเป็นสมาชิกและเพลิดเพลินกับบริการของเราอยู่แล้ว ให้เข้าสู่ระบบ
Keep up to date with the markets
Enable notifications to receive real-time important market updates:
ปฏิทินเศรษฐกิจ
ข่าวฟอเร็กซ์
You can disable notifications at any time from your browser.
Unblock Notifications
You've blocked browser notifications for Myfxbook.com. Please enable it:
You can disable notifications at any time from your browser.
ก่อนหน้า
การสำรวจความเห็น
จริง