![]() |
رد: ورشة برمجة مؤشر بافكار متجددة
اقتباس:
وايضا عند مستوى 25 يعطينى اشارة بيع هل ممكن عمل rsi لعمله فقط مثل الين لقياس مستوى الار اس مقابل جميع العملات؟؟ وبالتوفيق استاذنا الحبيب |
رد: ورشة برمجة مؤشر بافكار متجددة
نضيف هذه الكتابة خارج الدالة start
لجعل rsi اكثر مرونة [PHP] extern string l="_______level-RSI_______"; extern int RSI_buy_level=50; extern int RSI_sell_level=50; extern string m="_______Parameters-RSI_______"; extern int period_RSI=14; extern int applied_price_RSI=0; [/PHP] |
رد: ورشة برمجة مؤشر بافكار متجددة
اقتباس:
لا تستعجل اخي |
رد: ورشة برمجة مؤشر بافكار متجددة
اقتباس:
ولك رساله على الخاص تحياتى |
رد: ورشة برمجة مؤشر بافكار متجددة
الان نكتب rsi داخل الدالة start
في الحلقة التكرارية ونضيف خيار استخدام RSI لعملة اخري رغم ان هذا الخيار لن استخدمه في المؤشر |
رد: ورشة برمجة مؤشر بافكار متجددة
سيتم التصريح با RSi كالتالي
[PHP] double rsi=iRSI(symbol,0,14,0,i); [/PHP] حيث [PHP] symbol [/PHP] سنجعله متغير خارجي نضع فيه اي شارت نريد اضهار RSI له |
رد: ورشة برمجة مؤشر بافكار متجددة
التصريح باسم الشارت
[PHP] extern string symbol=" "; [/PHP] وضعنا اسم الشارد تلقائيا فارغ ماذا سيعمل المؤشر في هذه الحالة سنضيف دالة مقارنة نقول للمؤشر اذا وجدت اسم الشارت فارغ استخدم اسم الشارت الذي يوضع عليه المؤشر [PHP] if(symbol==" ") { symbol=Symbol(); } [/PHP] |
رد: ورشة برمجة مؤشر بافكار متجددة
الي هنا قمنا باضافة كل الاعددات التي نحتاجها لاستعمال RSI
ملاحضة لكي نجعل RSI متعدد الوقت فيه اضفات كثيرة يطول شرحها لذا لن نتطرق الي هذه النقطة [PHP] #property indicator_separate_window #property indicator_buffers 2 #property indicator_color1 Red #property indicator_color2 Green double ExtMapBuffer1[]; double ExtMapBuffer2[]; extern string l="_______level-RSI_______"; extern int RSI_buy_level=50; extern int RSI_sell_level=50; extern string m="_______Parameters-RSI_______"; extern int period_RSI=14; extern int applied_price_RSI=0; extern string symbol=" "; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_HISTOGRAM,0,3); SetIndexBuffer(0,ExtMapBuffer1); SetIndexStyle(1,DRAW_HISTOGRAM,0,3); SetIndexBuffer(1,ExtMapBuffer2); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int x,i; int counted_bars=IndicatorCounted(); if(counted_bars<0) return(-1); if(counted_bars>0) counted_bars--; x=Bars-counted_bars; if(symbol==" ") { symbol=Symbol(); } for(i =x ; i>=0 ; i--) { double rsi=iRSI(symbol,0,14,0,i); } return(0); } //+------------------------------------------------------------------+ [/PHP] |
رد: ورشة برمجة مؤشر بافكار متجددة
الان نضيف الشروط
وبعد الشروط نضع الهيستوغرام كما شرحنا في دورة البرمجة [PHP] #property indicator_separate_window #property indicator_buffers 2 #property indicator_color1 Red #property indicator_color2 Green double ExtMapBuffer1[]; double ExtMapBuffer2[]; extern int Shift=0; extern string l="_______level-RSI_______"; extern int RSI_buy_level=50; extern int RSI_sell_level=50; extern string m="_______Parameters-RSI_______"; extern int period_RSI=14; extern int applied_price_RSI=0; extern string symbol=" "; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_HISTOGRAM,0,3); SetIndexBuffer(0,ExtMapBuffer1); SetIndexStyle(1,DRAW_HISTOGRAM,0,3); SetIndexBuffer(1,ExtMapBuffer2); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int x,i; int counted_bars=IndicatorCounted(); if(counted_bars<0) return(-1); if(counted_bars>0) counted_bars--; x=Bars-counted_bars; if(symbol==" ") { symbol=Symbol(); } for(i =x ; i>=0 ; i--) { int shift1=i+Shift; double rsi=iRSI(symbol,0,14,0,shift1); if(rsi>RSI_buy_level) { ExtMapBuffer1[i]=0; ExtMapBuffer2[i]=rsi; } if(rsi<RSI_buy_level) { ExtMapBuffer1[i]=rsi; ExtMapBuffer2[i]=0; } } return(0); } //+------------------------------------------------------------------+ [/PHP] وهكذا نكون انتهينا من اشرات RSI وان شاء الله سنضيف اشرات اخري لكي يصبح المؤشر اقوي |
رد: ورشة برمجة مؤشر بافكار متجددة
فيه شئ غير مدروس في المؤشر انا لم ارد الاشارت اليه
في انتضار من يجده لكي نصححه |
الساعة الآن 01:19 AM |
Powered by vBulletin® Copyright ©2000 - 2025
جميع الحقوق محفوظة الى اف اكس ارابيا www.fx-arabia.com