النتائج 1 إلى 15 من 15
الموضوع: حل ضروري للمشكله اخواني
- 06-11-2017, 03:47 PM #1
حل ضروري للمشكله اخواني
| Expert initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
//--- (
double ticksize = MarketInfo(Symbol(),MODE_TICKSIZE)
if
(ticksize ==0.00001 && 0.001)
t = ticksize *10;
else
t = ticksize;
return(INIT_SUCCEEDED);
يعطيني ايرور ما الخطا في داله if اخواني الكرام
- 06-11-2017, 04:46 PM #2
ما الشرط الذي تريد وضعه في المقارنه أخي الكريم ؟
- 06-11-2017, 07:22 PM #3
الشرط اذا كانت المنصه رباعيه او خماسيه فعايز اخلي الاكسبرت يضرب الرقم ف 10 عشان يحسب النقط صح عشان تحديد التيك بروفت والستوب لوز
- 06-11-2017, 07:48 PM #4
ومعلش ياستاذ اسامه هتعبك معايا ايه الغلط في كدا انا قافل كل الدوال والخطا الي ظاهر الي ف الصور بسبب اول سطر ف ستارت العلامه (والاخيره
//| Expert tick function |
//+------------------------------------------------------------------+
void OnTick()
{
//
...
double _bid = NormalizeDouble(MarketInfo (Symbol(), MODE_BID), Digits); // define Low price
double _ask = NormalizeDouble(MarketInfo(Symbol(), MODE_ASK), Digits); //define High price
double _point = MarketInfo(Symbol(), MODE_POINT);
//--- define prices of necessary bars
open1 = NormalizeDouble(iOpen(Symbol(), Period(), 1), Digits);
open2 = NormalizeDouble(iOpen(Symbol(), Period(), 2), Digits);
close1 = NormalizeDouble(iClose(Symbol(), Period(), 1), Digits);
close2 = NormalizeDouble(iClose(Symbol(), Period(), 2), Digits);
low1 = NormalizeDouble(iLow(Symbol(), Period(), 1), Digits);
low2 = NormalizeDouble(iLow(Symbol(), Period(), 2), Digits);
high1 = NormalizeDouble(iHigh(Symbol(), Period(), 1), Digits);
high2 = NormalizeDouble(iHigh(Symbol(), Period(), 2), Digits);
//---
_bar1size=NormalizeDouble(((high1-low1)/_point),0);
//--- Finding bearish pattern BEOVB
if(timeBUOVB_BEOVB!=iTime(Symbol(),Period(),1) && //orders are not yet opened for this pattern
_bar1size > bar1size && //first bar is big enough, so the market is not flat
low1 < low2 &&//First bar's Low is below second bar's Low
high1 > high2 &&//First bar's High is above second bar's High
close1 < open2 && //First bar's ?lose price is lower than second bar's Open price
open1 > close1 && //First bar is a bearish bar
open2 < close2) //Second bar is a bullish bar
{
//--- we have described all conditions indicating that the first bar completely engulfs the second bar and is a bearish bar
timeBUOVB_BEOVB=iTime(Symbol(),Period(),1); // indicate that orders are already placed on this pattern
}
//--- Finding bullish pattern BUOVB
if(timeBUOVB_BEOVB!=iTime(Symbol(),Period(),1) && //orders are not yet opened for this pattern
_bar1size > bar1size && //first bar is big enough not to consider a flat market
low1 < low2 &&//First bar's Low is below second bar's Low
high1 > high2 &&//First bar's High is above second bar's High
close1 > open2 && //First bar's Close price is higher than second bar's Open price
open1 < close1 && //First bar is a bullish bar
open2 > close2) //Second bar is a bearish bar
{
//--- we have described all conditions indicating that the first bar completely engulfs the second bar and is a bullish bar
timeBUOVB_BEOVB=iTime(Symbol(),Period(),1); // indicate that orders are already placed on this pattern
OrderSend(Symbol(),OP_BUY,lot,Ask,3,Ask-st,Ask-TP,NULL,magic=0()
OrderSend (Symbol,OP_SELL,lot,Bid,3,Bid+st,Bid-TP,NULL,magic=0)()
}
- 06-11-2017, 09:03 PM #5
- 06-11-2017, 10:52 PM #6
- 06-11-2017, 10:55 PM #7
- 07-11-2017, 04:20 PM #8
//+------------------------------------------------------------------+
//| BEOVB_BUOVB_bar.mq4 |
//| Copyright 2015, Iglakov Dmitry. |
//| [email protected] |
//+------------------------------------------------------------------+
#property copyright "Copyright 2015, Iglakov Dmitry."
#property link "[email protected]"
#property version "1.00"
#property strict
extern int st = 30;
extern int interval = 25; //Interval
extern double lot = 0.1; //Lot Size
extern int TP = 400; //Take Profit
extern int magic = 962231; //Magic number
extern int slippage = 2; //Slippage
extern int ExpDate = 48; //Expiration Hour Order
extern int bar1size = 900; //Bar 1 Size
double t;
double buyPrice,//define BuyStop setting price
buyTP, //Take Profit BuyStop
buySL, //Stop Loss BuyStop
sellPrice, //define SellStop setting price
sellTP, //Take Profit SellStop
sellSL; //Stop Loss SellStop
double open1,//first candle Open price
open2, //second candle Open price
close1, //first candle Close price
close2, //second candle Close price
low1, //first candle Low price
low2, //second candle Low price
high1, //first candle High price
high2; //second candle High price
datetime _ExpDate =0; // local variable for defining pending orders expiration time
double _bar1size;// local variable required to avoid a flat market
datetime timeBUOVB_BEOVB;// time of a bar when pattern orders were opened, to avoid re-opening
//+------------------------------------------------------------------+
//| Expert initialization function |
//+------------------------------------------------------------------+
int OnInit()
(
//--- (
double ticksize = MarketInfo(Symbol(),MODE_TICKSIZE) ;
if (ticksize == 0.00001 || ticksize == 0.001)
double t = ticksize*10;
else t =ticksize
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Expert deinitialization function |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
}
//+------------------------------------------------------------------+
//| Expert tick function |
//+------------------------------------------------------------------+
void OnTick()
(
double _bid = NormalizeDouble(MarketInfo (Symbol(), MODE_BID), Digits); // define Low price
double _ask = NormalizeDouble(MarketInfo(Symbol(), MODE_ASK), Digits); //define High price
double _point = MarketInfo(Symbol(), MODE_POINT);
//--- define prices of necessary bars
open1 = NormalizeDouble(iOpen(Symbol(), Period(), 1), Digits);
open2 = NormalizeDouble(iOpen(Symbol(), Period(), 2), Digits);
close1 = NormalizeDouble(iClose(Symbol(), Period(), 1), Digits);
close2 = NormalizeDouble(iClose(Symbol(), Period(), 2), Digits);
low1 = NormalizeDouble(iLow(Symbol(), Period(), 1), Digits);
low2 = NormalizeDouble(iLow(Symbol(), Period(), 2), Digits);
high1 = NormalizeDouble(iHigh(Symbol(), Period(), 1), Digits);
high2 = NormalizeDouble(iHigh(Symbol(), Period(), 2), Digits);
//---
_bar1size=NormalizeDouble(((high1-low1)/_point),0);
//--- Finding bearish pattern BEOVB
if(timeBUOVB_BEOVB!=iTime(Symbol(),Period(),1) && //orders are not yet opened for this pattern
_bar1size > bar1size && //first bar is big enough, so the market is not flat
low1 < low2 &&//First bar's Low is below second bar's Low
high1 > high2 &&//First bar's High is above second bar's High
close1 < open2 && //First bar's ?lose price is lower than second bar's Open price
open1 > close1 && //First bar is a bearish bar
open2 < close2) //Second bar is a bullish bar
{
//--- we have described all conditions indicating that the first bar completely engulfs the second bar and is a bearish bar
timeBUOVB_BEOVB=iTime(Symbol(),Period(),1); // indicate that orders are already placed on this pattern
}
//--- Finding bullish pattern BUOVB
if(timeBUOVB_BEOVB!=iTime(Symbol(),Period(),1) && //orders are not yet opened for this pattern
_bar1size > bar1size && //first bar is big enough not to consider a flat market
low1 < low2 &&//First bar's Low is below second bar's Low
high1 > high2 &&//First bar's High is above second bar's High
close1 > open2 && //First bar's Close price is higher than second bar's Open price
open1 < close1 && //First bar is a bullish bar
open2 > close2) //Second bar is a bearish bar
{
//--- we have described all conditions indicating that the first bar completely engulfs the second bar and is a bullish bar
timeBUOVB_BEOVB=iTime(Symbol(),Period(),1); // indicate that orders are already placed on this pattern
int t=OrderSend(Symbol(),OP_BUY,lot,Ask,3,Ask-st,Ask-TP,NULL,magic=0);
t=OrderSend (Symbol,OP_SELL,lot,Bid,3,Bid+st,Bid-TP,NULL,magic=0);
)
شكرا علي مساعدتكم ولكن ايضا يوجد خطا انظروو
- 07-11-2017, 05:18 PM #9
- 07-11-2017, 08:22 PM #10
- 07-11-2017, 08:35 PM #11
السلام عليكم
الخطاء انك ما وضعت اقواس وظيفة() Symbol
- 07-11-2017, 09:10 PM #12
الي اعرفه حسب فيدو مشروح علي اليوتيوب ان الsymbol وظيفه العملات ولما يكتبها كدا بتبقي حسب الاكسبرت يتحط علي اي عمله ف دي اعملها ازاي ؟
- 07-11-2017, 10:45 PM #13
() Symbol في امر الشراء صحيحة اما في امر البيع انت كاتبها Symbol ركز قليلا
- 07-11-2017, 10:49 PM #14كود:
ticket=OrderSend(Symbol(),OP_BUY,newLot,NormalizeDouble(Ask,Digits),3*P,Ask-StopLoss*point,Ask+TakeProfit*point,"EA",MagicNumber,0,Blue);
- 08-11-2017, 02:08 AM #15شكرا علي مساعدتكم ولكن ايضا يوجد خطا انظروو
هناتك اخي اساسيات برمجية لابد نثقفها اولا قبل الدخول في الامور الاعقد