|
Post by iamgotzaa on Aug 16, 2016 13:09:35 GMT 7
|
|
|
Post by Xa Em on Aug 30, 2016 22:52:41 GMT 7
ไม่ดีหรอครับ
|
|
|
Post by iamgotzaa on Sept 6, 2016 7:49:16 GMT 7
|
|
|
Post by Xa Em on Sept 6, 2016 7:59:00 GMT 7
ต้องใช้ทุนเท่าไรครับ เอา ต่ำสุด
|
|
|
Post by iamgotzaa on Sept 6, 2016 16:18:10 GMT 7
ต้องใช้ทุนเท่าไรครับ เอา ต่ำสุด ตอนนี้ลองไป 5000 cent 6 คู่โดน Yen ไปไม่รอดเลยครับ 55 จริงๆโดนหนักๆก็ 300-500 pipsก็ไส้แตกแล้ว
|
|
|
Post by iamgotzaa on Sept 6, 2016 16:31:49 GMT 7
ok code เบิ้ล แบบ เบๆ Xa Em//+------------------------------------------------------------------+ //| x2.mq4 | //| Copyright 2016, MetaQuotes Software Corp. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2016, MetaQuotes Software Corp." #property link "https://www.mql5.com" #property version "1.00" #property strict
#include <LastOrder.mqh> int LastTicket;
int magic=1231; //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- create timer EventSetTimer(60);
//--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- destroy timer EventKillTimer();
} //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //--- string k=""; LastTicket=get_last_order(magic); StringAdd(k,"last ticket="+IntegerToString(LastTicket)); if(OrderSelect(LastTicket,SELECT_BY_TICKET)==true) { double distance=0; double mktquote=0; StringAdd(k," distance = "+DoubleToString(distance*MathPow(10,Digits-1),1)+" pips"); if(OrderType()==OP_BUY) { //if distance < 0 then loss distance=OrderOpenPrice()-Bid; mktquote=Ask; } if(OrderType()==OP_SELL) { //if distance > 0 then loss distance=Ask-OrderOpenPrice(); mktquote=Bid; }
//if distance (loss) is more than 10 pips if(distance<-100*Point) { //place new order
int t=OrderSend(Symbol(),OrderType(),2*OrderLots(),mktquote,2,0,0,"test ble",magic); while(IsTradeContextBusy()) { Sleep(100); } } } Comment(k); } //+------------------------------------------------------------------+ //| Timer function | //+------------------------------------------------------------------+ void OnTimer() { //---
} //+------------------------------------------------------------------+ //| ChartEvent function | //+------------------------------------------------------------------+ void OnChartEvent(const int id, const long &lparam, const double &dparam, const string &sparam) { //---
} //+------------------------------------------------------------------+
Attachments:LastOrder.mqh (79.66 KB)
|
|
|
Post by Xa Em on Sept 6, 2016 18:15:58 GMT 7
ขอบคุรครับ อิอิ
|
|