MQL 4 OrderSend
Download- การส่ง Order ของ MQL 4
- อ้างอิง MQL4 Reference
- ส่วนประกอบของคำสั่ง
- int OrderSend(
- string symbol, // symbol
- int cmd, // operation
- double volume, // volume
- double price, // price
- int slippage, // slippage
- double stoploss, // stop loss
- double takeprofit, // take profit
- string comment=NULL, // comment
- int magic=0, // magic number
- datetime expiration=0, // pending order expiration
- color arrow_color=clrNONE // color
- );
- รายละเอียด
- symbol : [in] Symbol for trading. , คู่เงิน
- cmd : [in] Operation type. It can be any of the Trade operation enumeration. , คำสั่ง ซื้อขาย
- volume : [in] Number of lots. , ขนาดที่ต้องการซื้อขาย
- price : [in] Order price. , ราคาที่ต้องการซื้อขาย
- slippage : [in] Maximum price slippage for buy or sell orders.
- stoploss : [in] Stop loss level. , จุดที่ต้องการตั้ง Stoploss
- takeprofit: [in] Take profit level., จุดที่ต้องการตั้ง Take Profit
- comment=NULL : [in] Order comment text. Last part of the comment may be changed by server.
- magic=0 : [in] Order magic number. May be used as user defined identifier.
- expiration=0 : [in] Order expiration time (for pending orders only). , เวลาที่ Order จะหมดอายุ
- arrow_color=clrNONE : [in] Color of the opening arrow on the chart. If parameter is missing or has CLR_NONE value opening arrow is not drawn on the chart.
ตัวอย่าง Source Code
Quiz
- ทดลองเขียน
- SendOrder Sell
- SendPreOrder Sell
- กำหนด ให้สามารถ Order ได้ทีละ 1 Order เท่านั้น
ไม่มีความคิดเห็น:
แสดงความคิดเห็น