Function: Complex Numbers

A set of functions to handle complex numbers.

from https://en.wikipedia.org/wiki/Complex_number:
A complex number is a number that can be expressed in the form a + bi, where a and b are real numbers, and i represents the imaginary unit, satisfying the equation i2 = −1. Because no real number satisfies this equation, i is called an imaginary number.
Release Notes: added a few extra functions, based on the js library:
Release Notes: added better formatting and comments on all functions, work in progress(complex arrays UDF)
Release Notes: corrected some issues added more comments
Release Notes: added "complex_set" functions for complex numbers, streamlined calls to use it, improving readability..
Release Notes: added: f_complex_equals(), f_complex_ceil().
improved comments.
Remove from Favorite Scripts Add to favorite indicators


Thanks for sharing these, very useful!
+4 Reply
for those wondering the uses of complex numbers in finance this link is a decent place to start:
+3 Reply
@Piticu, sometimes (often) it is best to first read what you want to post before actually posting it, this gives less embarrassment for yourself.

@RicardoSantos, your work is getting more and more suited to frame and hang on the wall as artwork!
+1 Reply
Thank you great human, the trading and rest is less important.
I wish you the best!
+1 Reply
Great work (as usual) Thank you!
I was waiting for a code for imaginary numbers... is all I wished, can`t wait to implement this in my strategy to make me some imaginary results.
So many defenders and yet no example how this code can be used , all pro`s here who knows how good this code is and yet a noob like finds no real use, why the hell earth is keeping me alive...
wroclai Piticu
@Piticu, Wow, you're actually doubling-down. NO ONE OWES YOU anything. Quit whining and start pounding books. Get out of here with your entitled crap. "why the hell earth is keeping me alive" .. on the other hand, DM me if you need someone to talk to because this is quite an odd thing to say in this context on this venue.
Ricardo, eu achei MUITO interessante aquele teu post sobre regressão polinomial, mas fiquei confuso pq n tenho muito conhecimento sobre esse tema. Li os links que tu colocou lá e vi mais alguns videos no youtube, mas ainda está tudo muito confuso sobre como eu poderia usar isso nos trades. Pretendo seguir estudando obviamente, mas será que tu podia algum dia escrever algo sobre o uso pratico do script? Eu fico me sentindo um macaco tentando entender os teus scripts, mas acho muito interessante as coisas q tu posta por aqui
Useless... why do you even bother to help the community? Probably will be voted as script of the month and posted in editorials pick like all other kind, for 90% noobs on TV you should post useful codes that has use in day trading if you really want to contribute, followed you because you use to post good codes now you only share you level up knowledge for others like you who understand this kind of code ... sad
@Piticu, strategies require logic, logic requires math, math requires expression, expression requires language. RicardoSantos is one of those rare breed of authors who freely and selflessly provides the necessary language so that others may use his ideas to build amazing indicators. Without his contributions many of the tools available here might not have ever been created.
+9 Reply
Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Referred friends Coins My Support Tickets Help Center Private Messages Chat Sign Out