จากตัวอย่างด้านล่างเป็นการแสดงผลขอกำไร/ขาดทุนของ Order ที่เราเปิดอยู่ ซึ่งจะแสดงหมายเลข Ticket และ Profit ที่เกิดขึ้น
ตัวอย่างการเขียนโค๊ด
int getLastOrderProfit() {
string name = "strProfit";
string strDispaly;
for(int i=0;i<OrdersTotal();i++){
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==true){
if(OrderSymbol()==Symbol()){
strDispaly = "Order Ticket "+ OrderTicket()+" Profit: " + DoubleToStr(OrderProfit(),0);
ObjectCreate(name,OBJ_LABEL,0,0,0);
ObjectSet(name,OBJPROP_XDISTANCE,5);
ObjectSet(name,OBJPROP_YDISTANCE,80);
ObjectSetText(name,strDispaly,14,"Arial",DodgerBlue);
return(OrderProfit());
}
}
}
}
int start() {
if(OrdersTotal()>0) {
getLastOrderProfit();
}
}

Your Affiliate Money Making Machine is waiting -
ตอบลบAnd earning money online using it is as simple as 1...2...3!
Here's how it all works...
STEP 1. Input into the system which affiliate products you want to promote
STEP 2. Add PUSH BUTTON traffic (this ONLY takes 2 minutes)
STEP 3. Watch the affiliate products system grow your list and sell your affiliate products all for you!
Do you want to start making profits??
The solution is right here