السلام عليكم ورحمة الله وبركاته
احتاج تعديل هذا الكود
المفروض انه يأخذ قيمة خليه من شيت الاكسل ويخرجها خط على الشارت فى الميتاتريدر
#property indicator_chart_window
#import "mt4excel.dll"
extern int TF=0;
extern color R3Color=Aqua;
extern color R2Color=Aqua;
extern color R1Color =Yellow;
extern color R1m2Color=Yellow;
extern color R1m1Color=Yellow;
extern color PColor =Yellow;
extern color S1m1Color=Yellow;
extern color S1m2Color=Yellow;
extern color S1Color =Yellow;
extern color S2Color=Aqua ;
extern color S3Color=Aqua;
extern int Width=1;
extern string FileName = "intrday.xls";
#property copyright "kzama"
#property show_inputs
#include <WinUser32.mqh>
#import "mt4excel.dll"
bool ExcelOpen();
bool ExcelClose();
bool ExcelOpenPattern(int NumPatt);
bool ExcelOpenFile(string FileName);
bool ExcelSave();
bool ExcelSaveAs(string FileName);
bool ExcelAddSheet(string Name);
bool ExcelSetFormulaCell(int X,int Y,string Value);
double ExcelGetValueCell(int X,int Y);
string ExcelGetTextCell(int X,int Y);
string ExcelGetFormulaCell(int X,int Y);
/*TypeD
xl3DArea -4098 xl3DAreaStacked 78 xl3DAreaStacked100 79 xl3DBarClustered 60 xl3DBarStacked 61 xl3DBarStacked100 62
xl3DColumn -4100 xl3DColumnClustered 54 xl3DColumnStacked 55 xl3DColumnStacked100 56 xl3DLine -4101 xl3DPie -4102
xl3DPieExploded 70 xlArea 1 xlAreaStacked 76 xlAreaStacked100 77 xlBarClustered 57 xlBarOfPie 71
xlBarStacked 58 xlBarStacked100 59 xlBubble 15 xlBubble3DEffect 87 xlColumnClustered 51 xlColumnStacked 52
xlColumnStacked100 53 xlConeBarClustered 102 xlConeBarStacked 103 xlConeBarStacked100 104 xlConeCol 105 xlConeColClustered 99
xlConeColStacked 100 xlConeColStacked100 101 xlCylinderBarClustered 95 xlCylinderBarStacked 96 xlCylinderBarStacked100 97 xlCylinderCol 98
xlCylinderColClustered 92 xlCylinderColStacked 93 xlCylinderColStacked100 94 xlDoughnut -4120 xlDoughnutExploded 80 xlLine 4 xlLineMarkers 65
xlLineMarkersStacked 66 xlLineMarkersStacked100 67 xlLineStacked 63 xlLineStacked100 64 xlPie 5 xlPieExploded 69 xlPieOfPie 68 xlPyramidBarClustered 109
xlPyramidBarStacked 110 xlPyramidBarStacked100 111 xlPyramidCol 112 xlPyramidColClustered 106 xlPyramidColStacked 107 xlPyramidColStacked100 108
xlRadar -4151 xlRadarFilled 82 xlRadarMarkers 81 xlStockHLC 88 xlStockOHLC 89 xlStockVHLC 90 xlStockVOHLC 91 xlSurface 83
xlSurfaceTopView 85 xlSurfaceTopViewWireframe 86 xlSurfaceWireframe 84 xlXYScatter -4169 xlXYScatterLines 74 xlXYScatterLinesNoMarkers 75
xlXYScatterSmooth 72 xlXYScatterSmoothNoMarkers 73 */
bool ExcelSetDiagramma(int TypeD,string Title,string XRange,string YRange,int Left,int Top,int Riht,int Bottom);
bool ExcelDiagrammaAddRange();
bool ExcelSetValueCell(int X,int Y,double Value);
bool ExcelSetTextCell(int X,int Y,string Value);
bool ExcelSetRange(string Range);
string ExcelGetFormat();
bool ExcelSetFormat(string Format);
bool ExcelSetFormula(string Formula);
bool ExcelIsFormula();
int ExcelRangeCount();
string ExcelRangeAdress();
bool ExcelRangeColumnWidth(int Width);
bool ExcelRangeRowHeight(int Height);
bool ExcelRangeInteriorColor(int Color);
bool ExcelRangeFontColor(int Color);
int ExcelGetLastErrorCode();
string ExcelGetLastErrorText();
#import
//+--------
int init() {
return(0);
}
//+----
int deinit() {
ObjectDelete("R3"+TF);
ObjectDelete("R2"+TF);
ObjectDelete("R1"+TF);
ObjectDelete("R1m2"+TF);
ObjectDelete("R1m1"+TF);
ObjectDelete("P"+TF);
ObjectDelete("S1m1"+TF);
ObjectDelete("S1m2"+TF);
ObjectDelete("S1"+TF);
ObjectDelete("S2"+TF);
ObjectDelete("S3"+TF);
Comment("");
return(0);
}
//+------------------------------------------------------------------+
int start() {
if(Width>5||Width<1)Width=1;
Comment("kzama level");
{
if (ExcelOpenFile("C:\Program Files\FBS Trader 4\experts\files\intrday.xls"))
double R3 = ExcelGetValueCell(73, 11);
double R2 = ExcelGetValueCell( 72, 11);
double R1 = ExcelGetValueCell(int 81,int 11);
double R1m2 =ExcelGetValueCell(int 80,int 11);
double R1m1 = ExcelGetValueCell(int 79,int 11);
double P = ExcelGetValueCell(int 78,int 11);
double S1m1 = ExcelGetValueCell(int 77,int 11);
double S1m2 = ExcelGetValueCell(int 76,int 11);
double S1 = ExcelGetValueCell(int 75,int 11);
double S2 = ExcelGetValueCell(int 68,int 11);
double S3 = ExcelGetValueCell(int 67,int 11);
draw("R3",R3,R3Color);
draw("R2",R2,R2Color);
draw("R1",R1,R1Color);
draw("R1m2",R1m2,R1m2Color);
draw("R1m1",R1m1,R1m1Color);
draw("P",P,PColor);
draw("S1m1",S1m1,S1m1Color);
draw("S1m2",S1m2,S1m2Color);
draw("S1",S1,S1Color);
draw("S2",S2,S2Color);
draw("S3",S3,S3Color);
}
return(0);
}
int draw(string name, double price,color _Color)
{
if(ObjectFind(name) != 0)
{
ObjectCreate(name, OBJ_HLINE, 0, 0,price);
ObjectSet(name, OBJPROP_COLOR, _Color);
ObjectSet(name, OBJPROP_STYLE, STYLE_SOLID);
ObjectSet(name, OBJPROP_WIDTH, Width);
}
if(ObjectGet(name,OBJPROP_PRICE1)!=price)
{ObjectDelete(name);}
}
//+------------------------------------------------------------------+
اعذرونى لضعف اللغة البرمجيه عندى:0016:
المهم ان شيت الاكسل وضعتة فى ملف files فى الميتاتريدر وحاولت كتير ان الكود يقرأه لكن للاسف مافيش فايده
فمعلش قلت اتعبكو معايا شويه