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 have a hard time to convert ELA indicators that are using loops to NT. The problem is that NT cannot use arrays similar ways ELA language is able to do. Here is an example of what I am trying to convert to NT (for loop is the problem):
But then I realized that the part pbuffer[x][1] is using array from previous bar, and not the value pBuffer[i+1] from the current bars array. I tried to change pBuffer to dataserie but it was not able to read arrays from previous bars. If someone have some ideas about how to handle this kind of code, please let me know.
Can you help answer these questions from other members on NexusFi?
in ninja you don't have to declare arrays for O,H,L,C you just simply call it Close[0] = currentprice, Close[1] = previous price etc... make sure you don't call out of bound i.e. you have only 5 bars and try to call Close[5]
but I am not sure if that help in this case. If I understand the code correct the problem is that the array pBuffer is not storing Close but instead it is storing this: price = (pbuffer[x] + pbuffer[x][1])/2.0; I have read a more about this thing and it seems that it is impossible to call an array from previous bar.