模糊逻辑交易程序原代码
模糊逻辑交易程序原代码 //+------------------------------------------------------------------+ //| _Fuzzy logic_.mq4 | //+------------------------------------------------------------------+ #define MAGICMA 16419780400 double Lots = 0.1; extern int TrailingStop = 35; extern double PercentMM = 8; extern double DeltaMM = 0; extern int InitialBalance = 10000; bool UseMM = true; extern double SL = 60; bool FirstSL = true; //###################################################################################################################################### double LotsOptimized() { double volume,TempVolume, F; TempVolume=Lots; if (UseMM) TempVolume =0.00001*(AccountBalance()*(PercentMM+DeltaMM)-InitialBalance*DeltaMM); volume=NormalizeDouble(TempVolume,2); if (volume>MarketInfo(Symbol(),MODE_MAXLOT)) volume=MarketInfo(Symbol(),MODE_MAXLOT); if (volume=arGator[4]){Rang[0,2]=1;} //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //2)========================================================WPR======================================================= if (WPR=arWPR[0] && WPR=arWPR[1] && WPR=arWPR[2] && WPR=arWPR[3] && WPR=arWPR[4] && WPR=arWPR[5] && WPR=arWPR[6] && WPR=arWPR[7]){Rang[1,4]=1;} //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //3)============================================================AC===================================================== if (AC10){tempAC_s=5;} //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ if (tempAC_b==arAC[0] || tempAC_b==arAC[1]){Rang[2,0]=1;} if (tempAC_b==arAC[2] || tempAC_b==arAC[3]){Rang[2,1]=1;} if (tempAC_s==arAC[4] || tempAC_s==arAC[5]){Rang[2,3]=1;} if (tempAC_s==arAC[6] || tempAC_s==arAC[7]){Rang[2,4]=1;} if (Rang[2,0]==0 && Rang[2,1]==0 && Rang[2,3]==0 && Rang[2,4]==0){Rang[2,2]=1;} //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //4)=========================================================DeMarker================================================== if (DeMarker=arDeMarker[0] && DeMarker=arDeMarker[1] && DeMarker=arDeMarker[2] && DeMarker=arDeMarker[3] && DeMarker=arDeMarker[4] && DeMarker=arDeMarker[5] && DeMarker=arDeMarker[6] && DeMarker=arDeMarker[7]){Rang[3,4]=1;} //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //5)==========================================================RSI====================================================== if (RSI=arRSI[0] && RSI=arRSI[1] && RSI=arRSI[2] && RSI=arRSI[3] && RSI=arRSI[4] && RSI=arRSI[5] && RSI=arRSI[6] && RSI=arRSI[7]){Rang[4,4]=1;} //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //________________________________________________________________ |
打赏
最新创建圈子
- 新闻EA运行效果图圈 2019-05-05
圈主:admin 帖子:1