Hi , i am looking for a Detailed Report in pips or a indicator with the last 10 close trades in pip.
I research and find this code
------------------------------------ ------------------------------------ ------------------------------------ ------------------------------------ --------------------------------
double orderpipsprofit;
color profcol;
int start()
{
ObjectsDeleteAll();
Display("heading", 40,20);
ObjectSetText("heading","Account History In Pips",12,"Verdana", Blue);
int counter1;
int ordercount = 0;
for(counter1 = OrdersHistoryTotal() -1; ordercount < 11; counter1--)
{
OrderSelect(counter1,SELECT_BY_POS, MODE_HISTORY);
int pipMult = 10000;
if(StringFind(OrderSymbol(),"JPY",0 ) != -1) pipMult = 100;
if(OrderType() == OP_BUY)
{
orderpipsprofit = (OrderClosePrice() - OrderOpenPrice()) * pipMult;
profcol = Blue; if(orderpipsprofit > 0) profcol = Lime; if(orderpipsprofit < 0) profcol = Red;
ordercount++;
}
if(OrderType() == OP_SELL)
{
orderpipsprofit = (OrderOpenPrice() - OrderClosePrice()) * pipMult;
profcol = Blue; if(orderpipsprofit > 0) profcol = Lime; if(orderpipsprofit < 0) profcol = Red;
ordercount++;
}
if(OrderType() == OP_BUY || OrderType() == OP_SELL)
{
Display("order" + OrderTicket(), 40, ((ordercount * 20) + 20));
ObjectSetText("order" + OrderTicket(),OrderSymbol() + " / " + DoubleToStr(orderpipsprofit,1),10," Verdana", profcol);
}
}
return(0);
}
void Display(string name, int x, int y)
{
ObjectCreate(name, OBJ_LABEL, 0, 0, 0);
ObjectSet(name, OBJPROP_CORNER, 0);
ObjectSet(name, OBJPROP_XDISTANCE, x);
ObjectSet(name, OBJPROP_YDISTANCE, y);
ObjectSet(name, OBJPROP_BACK, FALSE);
}
------------------------------------ ------------------------------------ ------------------------------------ ------------------------------------ ------------------------------------ -
Its works ,but i think this is the always the same LotPip and the brooker for brooker change that or change pair.
Can somebody merge this code with Sonic 4 Acess Panel ?
("Lotpip" *profit )*Size
Thanks in advanced
I research and find this code
------------------------------------ ------------------------------------ ------------------------------------ ------------------------------------ --------------------------------
double orderpipsprofit;
color profcol;
int start()
{
ObjectsDeleteAll();
Display("heading", 40,20);
ObjectSetText("heading","Account History In Pips",12,"Verdana", Blue);
int counter1;
int ordercount = 0;
for(counter1 = OrdersHistoryTotal() -1; ordercount < 11; counter1--)
{
OrderSelect(counter1,SELECT_BY_POS, MODE_HISTORY);
int pipMult = 10000;
if(StringFind(OrderSymbol(),"JPY",0 ) != -1) pipMult = 100;
if(OrderType() == OP_BUY)
{
orderpipsprofit = (OrderClosePrice() - OrderOpenPrice()) * pipMult;
profcol = Blue; if(orderpipsprofit > 0) profcol = Lime; if(orderpipsprofit < 0) profcol = Red;
ordercount++;
}
if(OrderType() == OP_SELL)
{
orderpipsprofit = (OrderOpenPrice() - OrderClosePrice()) * pipMult;
profcol = Blue; if(orderpipsprofit > 0) profcol = Lime; if(orderpipsprofit < 0) profcol = Red;
ordercount++;
}
if(OrderType() == OP_BUY || OrderType() == OP_SELL)
{
Display("order" + OrderTicket(), 40, ((ordercount * 20) + 20));
ObjectSetText("order" + OrderTicket(),OrderSymbol() + " / " + DoubleToStr(orderpipsprofit,1),10," Verdana", profcol);
}
}
return(0);
}
void Display(string name, int x, int y)
{
ObjectCreate(name, OBJ_LABEL, 0, 0, 0);
ObjectSet(name, OBJPROP_CORNER, 0);
ObjectSet(name, OBJPROP_XDISTANCE, x);
ObjectSet(name, OBJPROP_YDISTANCE, y);
ObjectSet(name, OBJPROP_BACK, FALSE);
}
------------------------------------ ------------------------------------ ------------------------------------ ------------------------------------ ------------------------------------ -
Its works ,but i think this is the always the same LotPip and the brooker for brooker change that or change pair.
Can somebody merge this code with Sonic 4 Acess Panel ?
("Lotpip" *profit )*Size
Thanks in advanced
Attached File(s)
Sonic_4 Access Panel (Black).mq4
167 KB
|
258 downloads