النتائج 1 إلى 15 من 124
الموضوع: دردشة عامة لأشياء مختلفة
- 24-09-2017, 02:48 AM #1
- 24-09-2017, 03:05 AM #2
sizeof all basic data types
trade_settings نوع من تحديد المستخدم- يحجز من الذااكرة با يتات تسااوي مجموع بايتات عناصر struct
كود PHP:struct trade_settings
{
char char1; //-128 to 127
uchar uchar1; //0-255
short short1; //-32768 and 32767
ushort ushort1; //0-65535
int int1; //-2 147 483 648, the maximal one is 2 147 483 647
uint uint1; //0 to 4 294 967 295.
long long1; //-9 223 372 036 854 775 808, the maximum value is 9 223 372 036 854 775 807.
ulong ulong1; //0 to 18 446 744 073 709 551 615
color color1; //
datetime datetime1; //
bool bool1; //
float float1; //
double double1; //
string string1; //
};
//--- Parametric constructor
void OnStart()
{
trade_settings c;
Print("------------------------------------------------- = ",sizeof(trade_settings));
Print("sizeof(char1) = " ,sizeof(c.char1) );
Print("sizeof(uchar1) = " ,sizeof(c.uchar1) );
Print("sizeof(short1) = " ,sizeof(c.short1) );
Print("sizeof(ushort1) = " ,sizeof(c.ushort1) );
Print("sizeof(int1) = " ,sizeof(c.int1) );
Print("sizeof(uint1) = " ,sizeof(c.uint1) );
Print("sizeof(long1) = " ,sizeof(c.long1) );
Print("sizeof(ulong1) = " ,sizeof(c.ulong1) );
Print("sizeof(color1) = " ,sizeof(c.color1) );
Print("sizeof(datetime1) = " ,sizeof(c.datetime1) );
Print("sizeof(bool1) = " ,sizeof(c.bool1) );
Print("sizeof(float1) = " ,sizeof(c.float1) );
Print("sizeof(double1) = " ,sizeof(c.double1) );
Print("sizeof(string1) = " ,sizeof(c.string1) );
Print("------------------------------------------------- = ");
}
آخر تعديل بواسطة فيلسوف البادية ، 24-09-2017 الساعة 03:11 AM
- 24-09-2017, 06:34 AM #3
ماهو الافضل لانددكس ااي عملة؟ الجمع ام الضرب؟
الضرب:
EUR^7= (EURGBP)*(EURAUD)*(EURNZD)*(EURUSD)*(EURCAD)*(EURC HF)*(EURJPY/100) Fآخر تعديل بواسطة فيلسوف البادية ، 24-09-2017 الساعة 06:40 AM
- 24-09-2017, 07:38 AM #4EUR^7= (EURGBP)*(EURAUD)*(EURNZD)*(EURUSD)*(EURCAD)*(EURC HF)*(EURJPY/100) F
كود PHP:#property indicator_separate_window
#property indicator_buffers 8
#property indicator_plots 8
//--- plot Label1EURGBP
#property indicator_label1 "EUR"
#property indicator_type1 DRAW_LINE
#property indicator_color1 clrWhite
#property indicator_style1 STYLE_SOLID
#property indicator_width1 1
//--- plot Label2
#property indicator_label2 "GBP"
#property indicator_type2 DRAW_LINE
#property indicator_color2 clrViolet
#property indicator_style2 STYLE_SOLID
#property indicator_width2 1
//--- plot Label3
#property indicator_label3 "AUD"
#property indicator_type3 DRAW_LINE
#property indicator_color3 clrRed
#property indicator_style3 STYLE_SOLID
#property indicator_width3 1
//--- plot Label4
#property indicator_label4 "NZD"
#property indicator_type4 DRAW_LINE
#property indicator_color4 clrBlue
#property indicator_style4 STYLE_SOLID
#property indicator_width4 1
//--- plot Label5
#property indicator_label5 "USD"
#property indicator_type5 DRAW_LINE
#property indicator_color5 clrYellow
#property indicator_style5 STYLE_SOLID
#property indicator_width5 1
//--- plot Label6
#property indicator_label6 "CAD"
#property indicator_type6 DRAW_LINE
#property indicator_color6 clrGray
#property indicator_style6 STYLE_SOLID
#property indicator_width6 1
//--- plot Label7
#property indicator_label7 "CHF"
#property indicator_type7 DRAW_LINE
#property indicator_color7 clrOrange
#property indicator_style7 STYLE_SOLID
#property indicator_width7 1
//--- plot Label8
#property indicator_label8 "JPY"
#property indicator_type8 DRAW_LINE
#property indicator_color8 clrLime
#property indicator_style8 STYLE_SOLID
#property indicator_width8 1
//--- indicator buffers
double Label1Buffer[];
double Label2Buffer[];
double Label3Buffer[];
double Label4Buffer[];
double Label5Buffer[];
double Label6Buffer[];
double Label7Buffer[];
double Label8Buffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
//--- indicator buffers mapping
SetIndexBuffer(0,Label1Buffer);
SetIndexBuffer(1,Label2Buffer);
SetIndexBuffer(2,Label3Buffer);
SetIndexBuffer(3,Label4Buffer);
SetIndexBuffer(4,Label5Buffer);
SetIndexBuffer(5,Label6Buffer);
SetIndexBuffer(6,Label7Buffer);
SetIndexBuffer(7,Label8Buffer);
//---
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[])
{
int TT=100;
double Label1=iClose("EURGBP",0,TT)*iClose("EURAUD",0,TT)*iClose("EURNZD",0,TT)*iClose("EURUSD",0,TT)*iClose("EURCAD",0,TT)*iClose("EURCHF",0,TT)*iClose("EURJPY",0,TT)/100.0;
double Label2=1.0/iClose("EURGBP",0,TT)*iClose("GBPAUD",0,TT)*iClose("GBPNZD",0,TT)*iClose("GBPUSD",0,TT)*iClose("GBPCAD",0,TT)*iClose("GBPCHF",0,TT)*iClose("GBPJPY",0,TT)/100.0;
double Label3=1.0/(iClose("EURAUD",0,TT)*iClose("GBPAUD",0,TT))*iClose("AUDNZD",0,TT)*iClose("AUDUSD",0,TT)*iClose("AUDCAD",0,TT)*iClose("AUDCHF",0,TT)*iClose("AUDJPY",0,TT)/100.0;
double Label4=1.0/(iClose("EURNZD",0,TT)*iClose("GBPNZD",0,TT)*iClose("AUDNZD",0,TT))*iClose("NZDUSD",0,TT)*iClose("NZDCAD",0,TT)*iClose("NZDCHF",0,TT)*iClose("NZDJPY",0,TT)/100.0;
double Label5=1.0/(iClose("EURUSD",0,TT)*iClose("GBPUSD",0,TT)*iClose("AUDUSD",0,TT)*iClose("NZDUSD",0,TT))*iClose("USDCAD",0,TT)*iClose("USDCHF",0,TT)*iClose("USDJPY",0,TT)/100.0;
double Label6=1.0/(iClose("EURCAD",0,TT)*iClose("GBPCAD",0,TT)*iClose("AUDCAD",0,TT)*iClose("NZDCAD",0,TT)*iClose("USDCAD",0,TT))*iClose("CADCHF",0,TT)*iClose("CADJPY",0,TT)/100.0;
double Label7=1.0/(iClose("EURCHF",0,TT)*iClose("GBPCHF",0,TT)*iClose("AUDCHF",0,TT)*iClose("NZDCHF",0,TT)*iClose("USDCHF",0,TT)*iClose("CADCHF",0,TT))*iClose("CHFJPY",0,TT)/100.0;
double Label8=1.0/(iClose("EURJPY",0,TT)/100.0*iClose("GBPJPY",0,TT)/100.0*iClose("AUDJPY",0,TT)/100.0*iClose("NZDJPY",0,TT)/100.0*iClose("USDJPY",0,TT)/100.0*iClose("CADJPY",0,TT)/100.0*iClose("CHFJPY",0,TT)/100.0);
for(int m=0;m<=800;m++) {
Label1Buffer[m]=MathPow(iClose("EURGBP",0,m)*iClose("EURAUD",0,m)*iClose("EURNZD",0,m)*iClose("EURUSD",0,m)*iClose("EURCAD",0,m)*iClose("EURCHF",0,m)*iClose("EURJPY",0,m)/100.0/Label1,1.0/7.0);
Label2Buffer[m]=MathPow(1.0/iClose("EURGBP",0,m)*iClose("GBPAUD",0,m)*iClose("GBPNZD",0,m)*iClose("GBPUSD",0,m)*iClose("GBPCAD",0,m)*iClose("GBPCHF",0,m)*iClose("GBPJPY",0,m)/100.0/Label2,1.0/7.0);
Label3Buffer[m]=MathPow(1.0/(iClose("EURAUD",0,m)*iClose("GBPAUD",0,m))*iClose("AUDNZD",0,m)*iClose("AUDUSD",0,m)*iClose("AUDCAD",0,m)*iClose("AUDCHF",0,m)*iClose("AUDJPY",0,m)/100.0/Label3,1.0/7.0);
Label4Buffer[m]=MathPow(1.0/(iClose("EURNZD",0,m)*iClose("GBPNZD",0,m)*iClose("AUDNZD",0,m))*iClose("NZDUSD",0,m)*iClose("NZDCAD",0,m)*iClose("NZDCHF",0,m)*iClose("NZDJPY",0,m)/100.0/Label4,1.0/7.0);
Label5Buffer[m]=MathPow(1.0/(iClose("EURUSD",0,m)*iClose("GBPUSD",0,m)*iClose("AUDUSD",0,m)*iClose("NZDUSD",0,m))*iClose("USDCAD",0,m)*iClose("USDCHF",0,m)*iClose("USDJPY",0,m)/100.0/Label5,1.0/7.0);
Label6Buffer[m]=MathPow(1.0/(iClose("EURCAD",0,m)*iClose("GBPCAD",0,m)*iClose("AUDCAD",0,m)*iClose("NZDCAD",0,m)*iClose("USDCAD",0,m))*iClose("CADCHF",0,m)*iClose("CADJPY",0,m)/100.0/Label6,1.0/7.0);
Label7Buffer[m]=MathPow(1.0/(iClose("EURCHF",0,m)*iClose("GBPCHF",0,m)*iClose("AUDCHF",0,m)*iClose("NZDCHF",0,m)*iClose("USDCHF",0,m)*iClose("CADCHF",0,m))*iClose("CHFJPY",0,m)/100.0/Label7,1.0/7.0);
Label8Buffer[m]=MathPow(1.0/(iClose("EURJPY",0,m)/100.0*iClose("GBPJPY",0,m)/100.0*iClose("AUDJPY",0,m)/100.0*iClose("NZDJPY",0,m)/100.0*iClose("USDJPY",0,m)/100.0*iClose("CADJPY",0,m)/100.0*iClose("CHFJPY",0,m)/100.0)/Label8,1.0/7.0);
}
return(rates_total);
}
//+------------------------------------------------------------------+
- 24-09-2017, 08:37 AM #5
- 24-09-2017, 08:41 AM #6كود PHP:
struct trade_settings
{
uchar slippage; // value of the permissible slippage-size 1 byte
char reserved1; // skip 1 byte
short reserved2; // skip 2 bytes
int reserved4; // another 4 bytes are skipped. ensure alignment of the boundary 8 bytes
double take; // values of the price of profit fixing
double stop; // price value of the protective stop
};
Attention: This example illustrates incorrectly designed data. It would be better first to declare the take and stop large data of the double type, and then declare the slippage member of the uchar type. In this case, the internal representation of data will always be the same regardless of the value specified in #pragma pack().
آخر تعديل بواسطة فيلسوف البادية ، 24-09-2017 الساعة 08:43 AM
- 24-09-2017, 09:22 PM #7
- 26-09-2017, 06:47 AM #8
- 26-09-2017, 07:09 AM #9
ومثلها
CHART_IS_MAXIMIZED ENUM_CHART_PROPERTY_INTEGER
CHART_IS_MINIMIZED ENUM_CHART_PROPERTY_INTEGER
CHART_IS_OBJECT ENUM_CHART_PROPERTY_INTEGER
CHART_KEYBOARD_CONTROL ENUM_CHART_PROPERTY_INTEGER
CHART_SHOW_ONE_CLICK ENUM_CHART_PROPERTY_INTEGER
- 26-09-2017, 07:12 AM #10
بينما خاص ب ةMQL5
CHART_CONTEXT_MENU ENUM_CHART_PROPERTY_INTEGER
CHART_CROSSHAIR_TOOL ENUM_CHART_PROPERTY_INTEGER
CHART_EVENT_MOUSE_WHEEL ENUM_CHART_PROPERTY_INTEGER
CHART_SHOW ENUM_CHART_PROPERTY_INTEGER
CHART_EXPERT_NAME ENUM_CHART_PROPERTY_STRING
CHART_SCRIPT_NAME ENUM_CHART_PROPERTY_STRINGآخر تعديل بواسطة فيلسوف البادية ، 26-09-2017 الساعة 07:20 AM
- 26-09-2017, 07:13 AM #11
بينما خاص ب ةMQL4
CHART_IS_OFFLINE ENUM_CHART_PROPERTY_INTEGER
- 26-09-2017, 07:21 AM #12
45 CHART_AUTOSCROLL
45 CHART_BRING_TO_TOP
45 CHART_COLOR_ASK
45 CHART_COLOR_BACKGROUND
45 CHART_COLOR_BID
45 CHART_COLOR_CANDLE_BEAR
45 CHART_COLOR_CANDLE_BULL
45 CHART_COLOR_CHART_DOWN
45 CHART_COLOR_CHART_LINE
45 CHART_COLOR_CHART_UP
45 CHART_COLOR_FOREGROUND
45 CHART_COLOR_GRID
45 CHART_COLOR_LAST
45 CHART_COLOR_STOP_LEVEL
45 CHART_COLOR_VOLUME
45 CHART_COMMENT
5 CHART_CONTEXT_MENU
5 CHART_CROSSHAIR_TOOL
45 CHART_DRAG_TRADE_LEVELS
45 CHART_EVENT_MOUSE_MOVE
5 CHART_EVENT_MOUSE_WHEEL
45 CHART_EVENT_OBJECT_CREATE
45 CHART_EVENT_OBJECT_DELETE
5 CHART_EXPERT_NAME
45 CHART_FIRST_VISIBLE_BAR
45 CHART_FIXED_MAX
45 CHART_FIXED_MIN
45 CHART_FIXED_POSITION
45 CHART_FOREGROUND
45 CHART_HEIGHT_IN_PIXELS
5 CHART_IS_MAXIMIZED
5 CHART_IS_MINIMIZED
45 CHART_IS_OBJECT
4 CHART_IS_OFFLINE
45 CHART_KEYBOARD_CONTROL
45 CHART_MODE
45 CHART_MOUSE_SCROLL
45 CHART_POINTS_PER_BAR
45 CHART_PRICE_MAX
45 CHART_PRICE_MIN
45 CHART_QUICK_NAVIGATION
45 CHART_SCALE
45 CHART_SCALE_PT_PER_BAR
45 CHART_SCALEFIX
45 CHART_SCALEFIX_11
5 CHART_SCRIPT_NAME
45 CHART_SHIFT
45 CHART_SHIFT_SIZE
5 CHART_SHOW
45 CHART_SHOW_ASK_LINE
45 CHART_SHOW_BID_LINE
45 CHART_SHOW_DATE_SCALE
45 CHART_SHOW_GRID
45 CHART_SHOW_LAST_LINE
45 CHART_SHOW_OBJECT_DESCR
45 CHART_SHOW_OHLC
45 CHART_SHOW_ONE_CLICK
45 CHART_SHOW_PERIOD_SEP
45 CHART_SHOW_PRICE_SCALE
45 CHART_SHOW_TRADE_LEVELS
45 CHART_SHOW_VOLUMES
45 CHART_VISIBLE_BARS
45 CHART_WIDTH_IN_BARS
45 CHART_WIDTH_IN_PIXELS
45 CHART_WINDOW_HANDLE
45 CHART_WINDOW_IS_VISIBLE
45 CHART_WINDOW_YDISTANCE
45 CHART_WINDOWS_TOTAL
- 26-09-2017, 01:44 PM #13
- 26-09-2017, 04:18 PM #14
- 28-09-2017, 01:51 AM #15
ChartNavigate
هل تعلم اهميتها؟؟
ج:
loading historical data
كود PHP:bool ChartNavigate(
long chart_id, // Chart ID
int position, // Position
int shift=0 // Shift value
);
آخر تعديل بواسطة فيلسوف البادية ، 28-09-2017 الساعة 02:05 AM