#include int rsiHandle; ulong ticketeee; CTrade tradeee; int OnInit() { int rsiHandle = iRSI(Symbol(),PERIOD_CURRENT,14,PRICE_CLOSE); return 0; } void OnTick() { double rsi[]; CopyBuffer(rsiHandle,0,1,1,rsi); if(rsi[0] > 70) { if(ticketeee <= 0) { tradeee.Sell(0.01,_Symbol); ulong ticketeee = tradeee.ResultRetcode(); } Print("Above 70"); } else if(rsi[0] < 30) { if(ticketeee <= 0) { tradeee.Buy(0.01,_Symbol); ulong ticketeee = tradeee.ResultRetcode(); } Print("Below 30"); } Comment(rsi[0]); }