Code solution if statement

Hi, I’m trying to learn Amibroker code…I searched on google but I didn’t find a solution to understand a part of code that I found (an if function that seems nested)…here it is:

if (GSvalue[i] <= 0)
Tvalue[i] = (High - *iRS[i];
if (Tvalue[i] < Tvalue[i- 1])
Tvalue[i] = Tvalue[i- 1];

etc. etc…

could someone explain me what it means? Thanks


As a new member of the forum, you need to do a couple of things.

  1. SEARCH - use the magnifier icon in the top right corner and see if anyone else has already asked/answered the question
  2. READ - the “How to use this site” section - especially the posting of Code with Code Tags
  3. READ - RT(F)M - Read the (F) Manual - especially the “if-else” statement in this case
  4. TRY - Try out what you think is a “simpler” version, and then make it more complex until you match the complexity you need in order to understand your situation
  5. SHOW - Show us what you have done and what you think and why, and hopefully we can help explain what is really going on.

Since you have 4 minutes of reading on the site since registering, it does not look like you have done any of this. In addition you need to spell out exactly what you need. If you don’t understand any of it, then you need to do more work. If you have an issue with the nested if, is it what the code in the nested if does, or is it how nesting works.

As you can see lots of issues that we could discuss, but we need to have you SHOW us where your issue is.

HTH (Hope That Helps)

Moderator comment: That is perfect answer to that question