Einzelnen Beitrag anzeigen
  #2 (permalink)  
Alt 04.02.20
MA-EA MA-EA ist offline
Elite Mitglied
 
Registriert seit: Sep 2015
Beiträge: 1.178
MA-EA befindet sich auf einem aufstrebenden Ast
Standard

Funktioniert das so?
Code:
 //=============================================================================================================
// O P E N   O R D E R S
//=============================================================================================================


if( RT==true && SPR_AL==true && BuyInv==false && SelInv==false ){


  int RSI_p_Bar = 2;
  double RSI_p = iRSI(Symbol(),Timeframe,RSI_Period,RSI_Price,RSI_p_Bar);


  if(open_Buy==true){
  
    if( RSI>RSI_IL_1 && RVI_Ma>RVI_Si ){


      while( RSI_p > RSI_IL_1 ){
    
        RSI_p_Bar++;
        
        Print( "-RSI Past=",RSI_p , "-RSI Past Bar=",RSI_p_Bar );
        
        return(RSI_p);}
        

        if( RSI_p < RSI_IL_1 ){
  
          if(IsTradeAllowed()==true)Ti=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,Buy_SL,Buy_TP,NULL,Buy_MN,0,Beige);

          Print( "send Buy:" , "-RSI=",RSI , "-RVI_Ma=",RVI_Ma , "-RVI_Si=",RVI_Si );

          if(Percent_of_Balance==true)Print( "AutoLot:" , "-MarginReq1L=",M_REQ , "-MinLot=",Min_L , "-OneL/MinL=",OneL_MinL , "-MREQ/MinL=",MREQ_MinL , "-AccBal=",AccountBalance() , "-1PercAccBal=",OPAB , "-ALP=",Auto_Lotsize_Perc , "-1PercAccBal*ALP=",OPAB_ALP , "-OPABALP/MREQMinL=",OPABALP_MREQMinL , "-OPABALP_MREQMinL*Min_L=",OPABALP_MREQMinL , "-Lots=OPABALP_MREQMinL*Min_L=",Lots );

          return(Ti); } } }


//////////////////////////////////////////////////////////////////////////////////////////////////////////////


  if(open_Sell==true){


    if( RSI<RSI_IL_2 && RVI_Ma<RVI_Si ){
    
      
      while(RSI_p < RSI_IL_2 ){
    
        RSI_p_Bar++;
      
        Print( "-RSI Past=",RSI_p , "-RSI Past Bar=",RSI_p_Bar );

        return(RSI_p);}


        if( RSI_p > RSI_IL_2 ){
 
          if(IsTradeAllowed()==true)Ti=OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,Sel_SL,Sel_TP,NULL,Sell_MN,0,Blue);

          Print( "send Sell:" , "-RSI=",RSI , "-RVI_Ma=",RVI_Ma , "-RVI_Si=",RVI_Si );

          Print( "AutoLot:" , "-MarginReq1L=",M_REQ , "-MinLot=",Min_L , "-OneL/MinL=",OneL_MinL , "-MREQ/MinL=",MREQ_MinL , "-AccBal=",AccountBalance() , "-1PercAccBal=",OPAB , "-ALP=",Auto_Lotsize_Perc , "-1PercAccBal*ALP=",OPAB_ALP , "-OPABALP/MREQMinL=",OPABALP_MREQMinL , "-OPABALP_MREQMinL*Min_L=",OPABALP_MREQMinL , "-Lots=OPABALP_MREQMinL*Min_L=",Lots );

          return(Ti); }}} }
Angehängte Dateien
Dateityp: mq4 RSI(past)_RVI_EA.mq4 (37,2 KB, 0x aufgerufen)