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)
First of all, I hope I'm posting this in the correct forum.
I'm a complete newbie on Thinkscript as my daily platform is Metatrader. However I have a Thinkscript code that I'd like to convert to run on MT4. I can figure out most of the code, however some lines puzzle me.
I'm interested in the Highest function used in the above code. At the first line, I assume the code "Highest(high, VarP)" will return the highest high of VarP bars back from the current bar (please correct me if I'm wrong here). However I cannot guess what the 3rd line is trying to do with the notation Highest(high, VarP)[VarP + 1]. It seems that the [VarP + 1] part is used as index, but an index to what exactly?
Please help me to understand the code above. Feel free to point me to any documentation which explain this kind of use of the function. I've searched through the online documentation but I can't find any instance where this function is used in this way.
Thanks and best regards.
S9
Can you help answer these questions from other members on NexusFi?
The number inside the [ ] is usually the lookback for the aggregation period. So it could be the previous Highest two periods ago [2] if the length is 1 (VarP).
Your question is too old but, i came across currently. So, replying as per my best knowledge.
You can go through the thinkorswim reference manual.
====> def VarA = Highest(high, VarP) - Lowest(low, VarP);
Following link will give you details about highest function, you have been asking about.
please google (thinkorswim reference highest).
====> def VarA = Highest(high, VarP) - Lowest(low, VarP);
please google (thinkorswim reference def)
Similarly, you can find all the syntax and pre-defined function library information here.
Hope this helps you. surely it is too late. but in case you are still looking for it.