لازم الترتيب لذلك اكتب الجملة كما هي وغير فقط عدد نقاط الربح التي تريدها وعدد نقاط الاستوب لوز وأنا سأكتب لك شرح كل دالة في بوست منفصل وبالتفصيل ليسهل عليك الفهم......ولو في أي سؤال في حاجة مش فاهمة أنا تحت أمرك
---------- Post added at 06:00 PM ---------- Previous post was at 05:54 PM ----------
The main function used to open a position or place a pending order.Code:OrderSend( string symbol, int cmd, double volume, double price, int slippage, double stoploss, double takeprofit, string comment=NULL, int magic=0, datetime expiration=0, color arrow_color=CLR_NONE)
Parameters:
symbol Symbol for trading.
cmd Operation type. It can be any of the Trade operation enumeration.
volume Number of lots.
price Preferred price of the trade.
slippage Maximum price slippage for buy or sell orders.
stoploss Stop loss level.
takeprofit Take profit level.
comment Order comment text. Last part of the comment may be changed by server.
magic Order magic number. May be used as user defined identifier.
expiration Order expiration time (for pending orders only).
arrow_color Color of the opening arrow on the chart. If parameter is missing or has CLR_NONE value opening arrow is not drawn on the chart.
Sample:
Code:int ticket; if(iRSI(NULL,0,14,PRICE_CLOSE,0)<25) { ticket=OrderSend(Symbol(),OP_BUY,1,Ask,3,Ask-25*Point,Ask+25*Point,"My order #2",16384,0,Green); if(ticket<0) { Print("OrderSend failed with error #",GetLastError()); return(0); } }
---------- Post added at 06:06 PM ---------- Previous post was at 06:00 PM ----------
لو عايز تقفل الصفقة المفتوحة التي لم تصل بعد للهدف أو الاستوب لوز تعمل ايه؟
تستخدم الأمر التالي
Parameters:Code:OrderClose( int ticket, double lots, double price, int slippage, color Color=CLR_NONE)
ticket - Unique number of the order ticket.
lots - Number of lots.
price - Preferred closing price.
slippage - Value of the maximum price slippage in points.
Color - Color of the closing arrow on the chart. If the parameter is missing or has CLR_NONE value closing arrow will not be drawn on the chart.
Sample:
يارب تكون مفهومة.......لو في أي حاجة مش واضحة اسأل فيها:)Code:if(iRSI(NULL,0,14,PRICE_CLOSE,0)>75) { OrderClose(order_id,1,Ask,3,Red); return(0); }
---------- Post added at 06:09 PM ---------- Previous post was at 06:06 PM ----------
لو فتحت أمر صفقة معلقة وعايز تحذفها تعمل ايه؟!!!!!!!!
Parameters:Code:OrderDelete( int ticket, color Color=CLR_NONE)
ticket - Unique number of the order ticket.
Color - Color of the arrow on the chart. If the parameter is missing or has CLR_NONE value arrow will not be drawn on the chart.
Sample:
Code:if(Ask>var1) { OrderDelete(order_ticket); return(0); }
---------- Post added at 06:15 PM ---------- Previous post was at 06:09 PM ----------
شرح كيفية معرفة سعر اغلاق الشمعةdouble iClose( string symbol, int timeframe, int shift)Code:iClose( string symbol, int timeframe, int shift)
Returns Close value for the bar of indicated symbol with timeframe and shift.
Parameters:
symbol - Symbol the data of which should be used to calculate indicator. NULL means the current symbol.
timeframe - Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.
shift - Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
Sample:
Print("Current bar for USDCHF H1: ",iTime("USDCHF",PERIOD_H1,i),", ", iOpen("USDCHF",PERIOD_H1,i),", ",
iHigh("USDCHF",PERIOD_H1,i),", ", iLow("USDCHF",PERIOD_H1,i),", ",
iClose("USDCHF",PERIOD_H1,i),", ", iVolume("USDCHF",PERIOD_H1,i));
---------- Post added at 06:26 PM ---------- Previous post was at 06:15 PM ----------
أما بالنسبة لسعر افتتاح الشمعة+الهي+اللو.....فهو نفس شرح الاغلاق لذلك سأكتب الكود فقط
Code:iOpen( string symbol, int timeframe, int shift)Code:iLow( string symbol, int timeframe, int shift)Code:iHigh( string symbol, int timeframe, int shift)