Find Jobs
Hire Freelancers

TradingView Pine script - create and read elements from array

$30-50 USD

Teljesítve
Kiadva ekkor: majdnem 3 évvel ezelőtt

$30-50 USD

Teljesítéskor fizetve
I have a list of conditions for a candle. This is just an example: aa = (close > open) and (low > low[1]) bb = (close[1] > open[1]) and (close[1] > 5) cc = (close > ((high[1] - low[1])*23.6/100 + low[1])) dd = (close > EMA34) and (close > ema(close, 10)) I set alert using the following code: if aa alert("A- " + tostring(close, "#.######"), alert.freq_once_per_bar) else if bb alert("B- " + tostring(close, "#.######"), alert.freq_once_per_bar) else if cc alert("C- " + tostring(close, "#.######"), alert.freq_once_per_bar) else if dd alert("D- " + tostring(close, "#.######"), alert.freq_once_per_bar) With each condition, I will get an alert with a letter at the beginning of the message so I can know the priority of the conditions, ie A is the best, D is the last one. Now I want to get a better alert with the conditions as descripted below: I would like to know if there is any way to check all conditions at the same time, so I can set the priority like: if the alert has all conditions fulfilled, so it's the best A if the alert has at least 3 conditions fulfilled, then it's B if the alert has at least 2 conditions, then it's C and if there is only 1 condition fulfilled, then it will be D The real list has more than 10 conditions so I cannot check them manually. Please give me some code to do it programmatically. It would be something like this: if (all-alert-fulfilled) alert("A- " + tostring(close, "#.######"), alert.freq_once_per_bar) else if (at least 9 conditions fulfilled) alert("B- " + tostring(close, "#.######"), alert.freq_once_per_bar) else if (at least 8 conditions fulfilled) alert("C- " + tostring(close, "#.######"), alert.freq_once_per_bar) else if (at least 7 conditions fulfilled) alert("D- " + tostring(close, "#.######"), alert.freq_once_per_bar) else .... I think, we can make an array with all conditions, then read elements from that array. Something like that, But I dont know how to do it. So please give me some working code.
Projektazonosító: 30959989

A projektről

4 ajánlat
Távolról teljesíthető projekt
Aktiválva: 3 évvel ezelőtt

Szeretne pénzt keresni?

A Freelancer oldalán történő árajánlatadás előnyei

Határozzon meg költségvetést és időkeretet
Kapja meg fizetését a munkáért
Vázolja ajánlatát
Ingyen regisztrálhat és adhat árajánlatot munkákra
Neki odaítélve:
Felhasználó avatár
Hello sir, Let me explain what I understand from the description, You will have an array of conditions ($condition_array) If all of the conditions are fulfilled, you want alert A, If one condition is not fulfilled, you want alert B and so on... If I am right or i missed something, then let me know in the chat.. I can do this within a very short time and the script that I will give you will be easy to read and easily customizable.
$50 USD 1 napon belül
5,0 (2 értékelés)
1,7
1,7
4 szabadúszó adott átlagosan $45 USD összegű árajánlatot erre a munkára
Felhasználó avatár
Hello Your project caught my interest and I have briefly reviewed your project details but I will need more explanation via chat. Kindly note that I am versed in developing trading systems be ye indicator, trading bot, screener, or what have you on exchanges with API and trading platforms like Metatrader, Ninjatrader, TOS, Tradestation, and Pine script. Which means I can deliver on your project as desired. I will be awaiting your chat to take the project further. Thank you.
$40 USD 7 napon belül
3,9 (5 értékelés)
3,9
3,9
Felhasználó avatár
I'm a pinescript expert and a software genius with in-depth knowledge backed with experirnce incoding and trading programming languages- expert advisors and indicators for MT4/MT5, NT7/NT8, tradingview, multi chat, binanace. I will be honoured to help you with your project. kindly chat me up and let's commence.
$40 USD 3 napon belül
0,0 (1 értékelés)
0,0
0,0

Az ügyfélről

VIETNAM zászlója
Hanoi, Vietnam
4,5
12
Fizetési mód hitelesítve
Tagság kezdete: okt. 5, 2015

Ügyfél-hitelesítés

Köszönjük! E-mailben elküldtük a linket, melyen átveheti ajándék egyenlegét.
E-mailje elküldése során valami hiba történt. Kérjük, próbálja újra.
Regisztrált Felhasználók Összes Közzétett Munka
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Előnézet betöltése
Hozzáférést adott a helymeghatározáshoz.
Belépési munkamenete lejárt, és kijelentkeztettük. Kérjük, lépjen be újra.