SYMBOL() AND NULL

 
HI
just a simple question in mql4 language
------------------------------------------------------------------ 
what is the difference between using NULL or SYMBOL() in the EAs:
if iRSI(NULL,...............
if iRSI(SYMBOL(),................. 
 
Same
 
biantoro kunarto:
Same
Thanks mr Biantoro
 

you're welcome

 
NULL = read the current chart
 
Siti Latifah:
NULL = read the current chart
Symbol()  ???
 
Mohammad Soubra:
Symbol()  ???
Same as NULL = read the current chart.
 

thanks ALL

so

if I want to write a code inside the .... ontick() function with a condition same like the below:

if (iRSI(NULL,0,14,0))>70.......sell

- the problem in the above ontick() condition that will sell each tick but I want to sell once only using the ontick() not start() function

PLZ HELP

 
Mohammad Soubra:

thanks ALL

so

if I want to write a code inside the .... ontick() function with a condition same like the below:

if (iRSI(NULL,0,14,0))>70.......sell

- the problem in the above ontick() condition that will sell each tick but I want to sell once only using the ontick() not start() function

PLZ HELP

Check for open order.
If there is no check operating conditions
 
Jose Miguel Soriano:
Check for open order.
If there is no check operating conditions
How?
 

Try this:

if ( OrdersTotal() == 0 )
    {
      // Check buy or sell signal 
      // if there is a signal open trade
    }