Announcement

Collapse
No announcement yet.

variables

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • variables

    If I have a statement such as:

    if(close(0) > close(-4) {
    ... do something
    }

    is it possible to use a variable for the word 'close' and use a parameter to select other options such as 'open' or 'hl2' to quickly change between them for testing purposes?

    I tried various ways and don't get an error, but it doesn't work either.

    Thanks for the help!

    Randy

  • #2
    Randy
    See the reply to a similar question in this thread
    Alex


    Originally posted by rw580
    If I have a statement such as:

    if(close(0) > close(-4) {
    ... do something
    }

    is it possible to use a variable for the word 'close' and use a parameter to select other options such as 'open' or 'hl2' to quickly change between them for testing purposes?

    I tried various ways and don't get an error, but it doesn't work either.

    Thanks for the help!

    Randy

    Comment


    • #3
      Exactly what I was trying to do!

      Thank you very much!

      Randy

      Comment


      • #4
        Randy
        You are most welcome
        Alex


        Originally posted by rw580
        Exactly what I was trying to do!

        Thank you very much!

        Randy

        Comment

        Working...
        X