RSI EA and Applied Price? - page 2

To add comments, please log in or register
occupy
39
occupy  
Alain Verleyen:
Show your code !

hi, I have the same problem.

BuyPoint:20 and SellPoint:80 for EURCHF

when the rsi touches the buypoint or sellpoint, order is opened. however, when this opened order is closed, although rsi doesn't touches the buypoint or sellpoint, immediately another order is opened for eurchf

parameter

   extern int       AppliedPrice=4;

 bar checks

   double RSInow=iRSI(NULL,0,RSIperiod,AppliedPrice,0);
   double RSIlast=iRSI(NULL,0,RSIperiod,AppliedPrice,1);
   double RSIprev=iRSI(NULL,0,RSIperiod,AppliedPrice,2);

  opening criteria

// Open buy
   if((RSInow>BuyPoint) && (RSIlast<BuyPoint) && (RSIprev<BuyPoint) && (halt1!=1) && (TradeTimeOk==1))
     {
      int openbuy=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,0,0,"RSI Trader Buy Order",MagicNumber1,0,Blue);
      if(CloseOnOpposite==true)closesell=1;
     }

// Open sell
   if((RSInow<SellPoint) && (RSIlast>SellPoint) && (RSIprev>SellPoint) && (halt2!=1) && (TradeTimeOk==1))
     {
      int opensell=OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,0,0,"RSI Trader Sell Order",MagicNumber2,0,Green);
      if(CloseOnOpposite==true)closebuy=1;
     }
Alain Verleyen
38980
Alain Verleyen  
occupant:

hi, I have the same problem.

BuyPoint:20 and SellPoint:80 for EURCHF

when the rsi touches the buypoint or sellpoint, order is opened. however, when this opened order is closed, although rsi doesn't touches the buypoint or sellpoint, immediately another order is opened for eurchf

parameter

 bar checks

  opening criteria

Please don't double post.
12
To add comments, please log in or register