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)
Hi, I would like to create a function (MyPTN) that is formed by different descriptions of patterns/market behaviors. These patterns should be declared as arrays (correct me if I'm wrong) and then define the function MyPTN that retrieves these patters/market behaviors.
Code I came up with:
This is just an idea since I never worked with arrays; at the moment I am getting an error indicating the ">" sign (numerical expression expected here).
The function will be used in a strategy, it should allow me to analyze the different results of the listed PTNs.
Any suggestion is appreciated.
Can you help answer these questions from other members on NexusFi?
Note sure what system you are using and not a real programmer, but thinking issue may be it's not seeing the boolean expression as a value, so something like:
By reading the EasyLanguage PDF, I think "Function Array parameter declaration" (page 109) is the solution. But again, I never used them, and trying to figure it out, any advice is welcome.
Hi, I would like to create a function (MyPTN) that is formed by different descriptions of patterns/market behaviors. These patterns should be declared as arrays (correct me if I'm wrong) and then define the function MyPTN that retrieves these patters/market behaviors.
Code I came up with:
Array: PTN[10](0), // Indicating 11 arrays from 0 to 10 (?)
numberPTN[10](0);
PTN[1] = Close > Close[1];
PTN[2] = Close < Close[1];
{list can go on}
MyPTN = PTN[numberPTN]; // Function
This is just an idea since I never worked with arrays; at the moment I am getting an error indicating the ">" sign (numerical expression expected here).
The function will be used in a strategy, it should allow me to analyze the different results of the listed PTNs.
Any suggestion is appreciated.
Current possible solution but still get an error:
// Boolean function MyPTN
inputs:
PatternNumber(numericsimple);
arrays:
Patterns[10](false);
// List of patterns
Patterns[1] = Close > Close[1];
Patterns[2] = Close < Close[1];
{rest of the list}
MyPTN = Patterns[PatternNumber];
The error is in the function MyPTN = Patterns[PatternNumber] "Numerical expression expected here" ("Patterns" is highlighted).