Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
There's probably better ways to do it but maybe try something like this:
if (value1 = 1 and value1[1] = 0) then HP2= high else hp2 = hp2[1];
Bare in mind if you are looking for the exact moment that value1 turns true it's exactly when high > hp, therefore hp2 will be just 1 tick higher than hp
you could also do this within the following block. Instead of using IFF you could use a regular if... then begin statement and store a value in a variable when the condition you check for is true.
you can use a new variable and when ever High > HP you would check if the High is also higher than this new variable and if it is update it to the new higher high. Depending on your intentions it could also make sense to reset this new variable to High at "If X = 3", too.