Missing input tab in expert properties - page 2

 
MillsbergN9:
Hi, 
yes there is none. What should I use to test??

void OnTick(void)
  {
   

   
     // Current chart, current period,20 candles, no shift, simple, close price
    double slowmovingaverage = iMA(NULL,0,20,0,MODE_SMA,PRICE_CLOSE,0);

     // Current chart, current period,20 candles, no shift, simple, close price
    double lastslowmovingaverage = iMA(NULL,0,20,0,MODE_SMA,PRICE_CLOSE,1);

      // Current chart, current period,20 candles, no shift, simple, close price
    double fastmovingaverage = iMA(NULL,0,10,0,MODE_SMA,PRICE_CLOSE,0);

     // Current chart, current period,20 candles, no shift, simple, close price
    double lastfastmovingaverage = iMA(NULL,0,10,0,MODE_SMA,PRICE_CLOSE,1);
   
     //if the fast SMA is now above
     if ((lastfastmovingaverage > lastslowmovingaverage)
         &&(fastmovingaverage < slowmovingaverage))
  
      // Chart output for buy signal
      Comment ("SELL");
   
  
  }
     

You need to declare Extern variables outside of the OnTick loop e.g.

//---- input parameters
extern double    StartLots=0.1;
extern int       Slippage=0;
extern double    TakeProfit=80;
extern double    Stoploss=1000;
extern int       majic=567890;
extern int       Sequence = 1; 
extern int       EarlyCycles = 2;


int OnTick()
  {
   

   }

Obviously choose variable names and types relevant to your EA.

 
Keith Watford:
You have your answer, why do you expect to see anything in the inputs when you haven't put them in the code?????
Yes, I just thought it was something that came automatically. 

But Im not getting any results
 
Lachlan Meakin:

You need to declare Extern variables outside of the OnTick loop e.g.

Obviously choose variable names and types relevant to your EA.

Thanks!

But I’m not getting a results 
What am I doing wrong?
 
MillsbergN9:

Copy and paste code using the code button (Alt+S)

Do not post images of code as others cannot copy and paste to check.

 
Keith Watford:

Copy and paste code using the code button (Alt+S)

Do not post images of code as others cannot copy and paste to check.

Okay I see 👍

extern double startlots=0.1;



void OnTick(void)
  {
   

   
     // Current chart, current period,20 candles, no shift, simple, close price
    double slowmovingaverage = iMA(NULL,0,20,0,MODE_SMA,PRICE_CLOSE,0);

     // Current chart, current period,20 candles, no shift, simple, close price
    double lastslowmovingaverage = iMA(NULL,0,20,0,MODE_SMA,PRICE_CLOSE,1);

      // Current chart, current period,20 candles, no shift, simple, close price
    double fastmovingaverage = iMA(NULL,0,10,0,MODE_SMA,PRICE_CLOSE,0);

     // Current chart, current period,20 candles, no shift, simple, close price
    double lastfastmovingaverage = iMA(NULL,0,10,0,MODE_SMA,PRICE_CLOSE,1);
   
     //if the fast SMA is now above
     if ((lastfastmovingaverage > lastslowmovingaverage)
         &&(fastmovingaverage < slowmovingaverage))
  
      // Chart output for buy signal
      Comment ("SELL");
   
  
  }
     
 
Keith Watford:

Copy and paste code using the code button (Alt+S)

Do not post images of code as others cannot copy and paste to check.

 
Please do not post an image of code or the editor — it is generally to small to be read.

Please edit your multiple posts and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
          General rules and best pratices of the Forum. - General - MQL5 programming forum
          Messages Editor

You've been asked multiple times and continue to ignore our requests.

Your last post (#15) contains an extern. Did you compile it? Did you check for the tab? You didn't ask state anything.

 
Yes I compiled it but not sure I’m not getting any results
Reason: