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)
Would be very grateful for your assistance with this code please. I have already posted it on the NT forum, but not getting much response/assistance at present. Basically its an indicator I am trying to write to use in the Market Analyzer of NT. I am a complete novice to NT scripts and C#, and this is just my crude and primitive attempt using the NT indicator wizard and nicking snippets of code here and there.
What I am after is an indicator to return 1 if a condition is met or 0 otherwise. The condition is basically to look at the last four bars to see if are in a very narrow range (highest range not more than say 0.25c) and also if close to the day's high or low so far.
Not surprisingly, it failed to compile, giving me the following errors:
Class member declaration expected
Invalid token 'namespace' in class, struct, or interface member declaration
Invalid token '{' in class, struct, or interface member declaration
} expected
Many thanks for you assistance.
Can you help answer these questions from other members on NexusFi?
Ok, been working on the code (basically through trial and error, not too sure exactly what I am doing ). However, the amended code below so far has compiled successfully. I have not tested it yet as the markets (US stocks) are currently closed. Logically though, does it look correct, will it do what I want it to do? Many thanks.
As a novice, make sure you use curly brackets with every if statement, ie:
C# will process only first line after if when curly bracket is missing so it is a good practice to use them, especially when you don't know what your are doing