Draw up arrow and down arrow on conditions

 

Hi There

I am busy learning MQL5.

I have created a simple function that check a larry conners RSI 2 entry points.

I would like to draw an up arrow when the Buy conditions are met and a down arrow when the sell conditions are met. On the next candle.


Function


string CheckLarryConners () {
   
   string signal = "" ;
   
   double MyRSIArray[];
   double MySMAArray[];
   MqlRates PriceInfo[];
   
   int myRSIDefinition = iRSI(_Symbol,_Period,2,PRICE_CLOSE);
   int PriceData = CopyRates(_Symbol,_Period,0,3,PriceInfo);
   int mySMADefinition = iMA(_Symbol,_Period,20 ,0 ,MODE_SMA,PRICE_CLOSE);
   
   ArraySetAsSeries(MyRSIArray,true);
   ArraySetAsSeries(PriceInfo,true);
   ArraySetAsSeries(MySMAArray,true);
   
   CopyBuffer(myRSIDefinition,0,0,3 ,MyRSIArray);
   CopyBuffer(mySMADefinition,0,0,3 ,MySMAArray);
   
   double MyRSIValue = NormalizeDouble(MyRSIArray[1],2);
   
   if (MyRSIValue > 90 )
   {
     if (PriceInfo[1].close < MySMAArray[1])
     {
       signal = "sell";
     }
   }
   
   if (MyRSIValue < 10 )
   {
     if (PriceInfo[1].close > MySMAArray[1])
     {
       signal = "buy";
     }
   }
   return signal;

Main File


//+------------------------------------------------------------------+
//| Include                                                          |
//+------------------------------------------------------------------+
#include "Entry/CheckLarryConners.mq5"


void OnTick()
{

   string signal = CheckLarryConners();
   
   //Draw up arrow on buy or sell signal on next candle
  
}