Jump to content
Medved Trader Forums

Recommended Posts

Posted

In advanced code... will be able do something like:


if (Any(1,5, Close>Open && Close>Close[1]))
  ... do something


which would mean if any of the candles from 1 back to 5 back are positive and close higher than previous one....

of course, if the condition doesn't fit exactly into an expression, can also do full code like this:

if (Close.Any(1, 5, (i, x) =>

                    {
                       if (Close<=Open) return false;
                       return (Close>Close[i+1]);
                    }
                  );)
... do something


but that is more complex.

  • Thanks 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...