Can someone compile this and put up a link to the completed file

 

Hi,

I found an indicator I would like to use put it does not come in the compiled format.

I use windows 7 664 and have tried every suggestion to get my metaeditor to compile but it does not.

If someone would compile this and put up a link to both files I would be grateful.

Thank you in advance

#property copyright "3dmarketanalysis"
#property link "http://www.3dmarketanalysis.com"

#property indicator_chart_window

extern string Account_Symbol = "£";
extern string Order_Comment = "";
extern int Order_Magic_Number = 0;
extern color Buy_Line_Color = Blue;
extern color Sell_Line_Color = Purple;
extern color Long_Text_Color = Blue;
extern color Short_Text_Color = Blue;
extern int Text_Corner_0_to_3 = 0;
extern int Text_X_Distance = 5;
extern int Long_Text_Y_Distance = 14;
extern int Short_Text_Y_Distance = 30;

int init()
{
ObjectCreate("Average_Buy_Report",OBJ_LABEL,0,0,0);
ObjectCreate("Average_Sell_Report",OBJ_LABEL,0,0,0);
return(0);
}

int deinit()
{
ObjectDelete("Average_Sell_Line");
ObjectDelete("Average_Buy_Line");
ObjectDelete("Average_Sell_Report");
ObjectDelete("Average_Buy_Report");
return(0);
}

int start()
{
int counted_bars=IndicatorCounted();
double Total_Sell_Price=0;
double Cons_Sell_Price=0;
double Total_Sell_Size=0;
double Total_Buy_Price=0;
double Cons_Buy_Price=0;
double Total_Buy_Size=0;
double Long_Profit=0;
double Short_Profit=0;
double Long_Locked=0;
double Short_Locked=0;
int i;

ObjectDelete("Average_Buy_Line");
ObjectDelete("Average_Sell_Line");
for(i=0;i<OrdersTotal();i++)
{
OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
if(OrderSymbol()==Symbol() && OrderComment()==Order_Comment && OrderMagicNumber()==Order_Magic_Number)
{
if(OrderType()==OP_BUY)
{
Total_Buy_Price += OrderOpenPrice()*OrderLots();
Total_Buy_Size += OrderLots();
Long_Profit += OrderProfit() + OrderSwap();
if(Bid != OrderOpenPrice())
{
Long_Locked += ((OrderStopLoss()-OrderOpenPrice())/(Bid-OrderOpenPrice()))*OrderProfit();
}
}
if(OrderType()==OP_SELL)
{
Total_Sell_Price += OrderOpenPrice()*OrderLots();
Total_Sell_Size += OrderLots();
Short_Profit += OrderProfit() + OrderSwap();
if(Ask != OrderOpenPrice())
{
Short_Locked += ((OrderOpenPrice()-OrderStopLoss())/(OrderOpenPrice()-Ask))*OrderProfit();
}
}
}
}
if(Total_Buy_Price>0)
{
Total_Buy_Price /= Total_Buy_Size;
ObjectCreate("Average_Buy_Line",OBJ_HLINE,0,0,Total_Buy_Price);
ObjectSet("Average_Buy_Line",OBJPROP_COLOR,Buy_Line_Color);
}
if(Total_Sell_Price>0)
{
Total_Sell_Price /= Total_Sell_Size;
ObjectCreate("Average_Sell_Line",OBJ_HLINE,0,0,Total_Sell_Price);
ObjectSet("Average_Sell_Line",OBJPROP_COLOR,Sell_Line_Color);
}

ObjectSet("Average_Buy_Report",OBJPROP_CORNER,Text_Corner_0_to_3);
ObjectSet("Average_Buy_Report",OBJPROP_XDISTANCE,Text_X_Distance);
ObjectSet("Average_Buy_Report",OBJPROP_YDISTANCE,Long_Text_Y_Distance);
ObjectSet("Average_Buy_Report",OBJPROP_COLOR,Long_Text_Color);
ObjectSet("Average_Buy_Report",OBJPROP_WIDTH,3);
ObjectSet("Average_Buy_Report",OBJPROP_BACK,false);
ObjectSet("Average_Buy_Report",OBJPROP_FONTSIZE,12);
ObjectSetText("Average_Buy_Report",StringConcatenate("Long: ",Total_Buy_Price,", ",
Total_Buy_Size,", ",Account_Symbol,Long_Profit,", ",Account_Symbol,DoubleToStr(Long_Locked,2)),10,"Times New Roman");
ObjectSet("Average_Sell_Report",OBJPROP_CORNER,Text_Corner_0_to_3);
ObjectSet("Average_Sell_Report",OBJPROP_XDISTANCE,Text_X_Distance);
ObjectSet("Average_Sell_Report",OBJPROP_YDISTANCE,Short_Text_Y_Distance);
ObjectSet("Average_Sell_Report",OBJPROP_COLOR,Short_Text_Color);
ObjectSet("Average_Sell_Report",OBJPROP_WIDTH,3);
ObjectSet("Average_Sell_Report",OBJPROP_BACK,false);
ObjectSet("Average_Sell_Report",OBJPROP_FONTSIZE,12);
ObjectSetText("Average_Sell_Report",StringConcatenate("Short: ",Total_Sell_Price,", ",
Total_Sell_Size,", ",Account_Symbol,Short_Profit,", ",Account_Symbol,DoubleToStr(Short_Locked,2)),10,"Times New Roman");

return(0);
}

 

Hi wfws,

Use SRC button to post your code

You still have problem with that 7 ?. Sure, you install them outside C:\Program Files\... ?. You may have to click compatibility files or look at the address at the bottom picture suggests.

Anyway attached zip is compiled with build 419 and 432.

Funny, helping you with my post number 911 :)

:D

Files:
 
Don't install in \program files* on Vista/Win7