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 futures io?
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
The following user says Thank You to gregid for this post: