|
Post by Xa Em on Aug 22, 2016 12:32:26 GMT 7
อาจารย์ครับ ทำยังไงครับ ปิด PipeServer_Ansi.mq4 มันจะค้าง จะทำยังไงครับไม่ให้ค้าง โดยที่ ไม่ต้อง พิม STOP ที่ Excel ครับ
|
|
|
Post by iamgotzaa on Aug 22, 2016 12:55:09 GMT 7
อาจารย์ครับ ทำยังไงครับ ปิด PipeServer_Ansi.mq4 มันจะค้าง จะทำยังไงครับไม่ให้ค้าง โดยที่ ไม่ต้อง พิม STOP ที่ Excel ครับ ผมยังไม่ได้ลองเลยครับ... เพิ่งประชุมตอนเช้าเสร็จ เนี่ยกว่าจะได้นั่ง >_<""
|
|
|
Post by iamgotzaa on Aug 22, 2016 12:55:46 GMT 7
ทำ เป็น ex4 ให้หน่อยสิครับ file ansi
|
|
|
Post by Xa Em on Aug 22, 2016 13:41:03 GMT 7
|
|
|
Post by Xa Em on Aug 22, 2016 13:50:31 GMT 7
ผมติดตรงนี้แหละครับ ไปต่อไม่ได้
|
|
|
Post by iamgotzaa on Aug 23, 2016 9:57:31 GMT 7
ตะกี้ลองแล้วครับ pipeserver แจ่มมาก
ผมลองดูมันดึงฟังก์ชั่น kernel.dll มาใช้
#import "kernel32.dll" int CreateNamedPipeA(uchar& PipeName[],int dwOpenMode,int dwPipeMode,int nMaxInstances,int nOutBufferSize,int nInBufferSize,int nDefaultTimeOut,int lpSecurityAttributes); int ConnectNamedPipe(int hPipe,int lpOverlapped); int ReadFile(int hPipe, uchar& inBuffer[],int NumberOfBytesToRead, int& bytesRead[], int lpOverlapped); int WriteFile(int hPipe, uchar& outBuffer[], int NumberOfBytesToWrite, int& bytesWritten[], int lpOverlapped); int FlushFileBuffers(int hPipe); int DisconnectNamedPipe(int hPipe); int CloseHandle(int hPipe); #import
...
นอกเหนือความสามารถผมแล้วว่า ทำไงจะไม่ค้าง
ผมคิดได้ว่าต้องมีการให้ mt4 เช็คว่า เราเปิด excel อยู่ด้วยหรือไม่ ถ้าไม่มีก็ flush แล้ว disconnect ด้วยอันดับและรูปแบบเดียวกับการพิมพ์คำว่า STOP แล้วก็ send
|
|
|
Post by Xa Em on Aug 23, 2016 10:04:21 GMT 7
จะเช็คยังงัยครับอาจารย์ คือผมจะทำ ผมจะให้ excel รับค่า เงินทุนที่สามารถออกออเด่อได้ แล้วส่งออเด๋อ ที่คำนวณ lots ออกไป แล้วออกออเดอ หรือ ใช้ ea เช็ค ออเดอ แล้วคำนวณ lots เอง
|
|
|
Post by iamgotzaa on Aug 23, 2016 10:56:38 GMT 7
อืม น่าจะมีวิธีดีกว่า txt ไฟล์ครับ ขอดูก่อน... ปล. ผมไม่ได้อู้นะ เมื่อวานว่าจะทำคอมที่บ้านก็เปิดไม่ขึ้น จอฟ้าตลอด... เซ็ง
|
|
|
Post by iamgotzaa on Aug 23, 2016 10:59:38 GMT 7
จะเช็คยังงัยครับอาจารย์ คือผมจะทำ ผมจะให้ excel รับค่า เงินทุนที่สามารถออกออเด่อได้ แล้วส่งออเด๋อ ที่คำนวณ lots ออกไป แล้วออกออเดอ หรือ ใช้ ea เช็ค ออเดอ แล้วคำนวณ lots เอง ลองอันนี้ยังครับ fx1.net/excellink.phpใส่ค่า int ExcelPutValue(int sheet,int Row, int Col, float Value) int ExcelPutString(int sheet,int Row, int Col, string Str) อ่านค่า float ExcelGetValue(int sheet,int Row, int Col) str ExcelGetString(int sheet,int Row, int Col)
|
|
|
Post by Xa Em on Aug 23, 2016 13:17:56 GMT 7
ลองแล้วครับ ไม่เวิคครับ มันเอาไปใช้กับ *.xlsm ไม่ได้ครับ ใช้ได้เฉพาะ *.xls
|
|
|
Post by Xa Em on Aug 23, 2016 13:18:54 GMT 7
มันเปิดอ่าน และเขียน ไม่ได้พร้อมกันครับ ถ้าทำอันไหน อีกอันต้องหยุดการทำงาน
|
|
|
Post by Xa Em on Aug 27, 2016 13:40:08 GMT 7
ตะกี้ลองแล้วครับ pipeserver แจ่มมาก ผมลองดูมันดึงฟังก์ชั่น kernel.dll มาใช้ #import "kernel32.dll" int CreateNamedPipeA(uchar& PipeName[],int dwOpenMode,int dwPipeMode,int nMaxInstances,int nOutBufferSize,int nInBufferSize,int nDefaultTimeOut,int lpSecurityAttributes); int ConnectNamedPipe(int hPipe,int lpOverlapped); int ReadFile(int hPipe, uchar& inBuffer[],int NumberOfBytesToRead, int& bytesRead[], int lpOverlapped); int WriteFile(int hPipe, uchar& outBuffer[], int NumberOfBytesToWrite, int& bytesWritten[], int lpOverlapped); int FlushFileBuffers(int hPipe); int DisconnectNamedPipe(int hPipe); int CloseHandle(int hPipe); #import ... นอกเหนือความสามารถผมแล้วว่า ทำไงจะไม่ค้าง ผมคิดได้ว่าต้องมีการให้ mt4 เช็คว่า เราเปิด excel อยู่ด้วยหรือไม่ ถ้าไม่มีก็ flush แล้ว disconnect ด้วยอันดับและรูปแบบเดียวกับการพิมพ์คำว่า STOP แล้วก็ send พอจะนึกอะไรออก วันอาทิตย์นี้ลุยต่อ
|
|
|
Post by Xa Em on Sept 3, 2016 1:14:19 GMT 7
ผลทดสอบ auto trade ส่งคำสั่งจาก excel ผ่าน Pipeserver ใกล้เสร็จแล้ว อิอิ
|
|
|
Post by Xa Em on Sept 3, 2016 1:18:42 GMT 7
ต่อไปเป็นการคำนวณ lots
|
|
|
Post by iamgotzaa on Sept 5, 2016 8:48:27 GMT 7
เชรด ต่อได้เรื่อยๆจริงๆ กราบครับ (ノ。≧◇≦)ノ ~~bansai
|
|
|
Post by Xa Em on Sept 5, 2016 9:22:13 GMT 7
เซงเจอ บัค Pipeserver
|
|