toodegrees

forex_factory_decoding

toodegrees Uppdaterad   
Library "forex_factory_decoding"
Supporting Utility Library for the Live Economic Calendar by toodegrees Indicator; responsible for formatting and saving Forex Factory News events.

isLeapYear()
  Finds if it's currently a leap year or not.
  Returns: Returns True if the current year is a leap year.

daysMonth(M)
  Provides the days in a given month of the year, adjusted during leap years.
  Parameters:
    M (int): Month in numerical integer format (i.e. Jan=1).
  Returns: Days in the provided month.

MMM(M)
  Converts a month from a numerical integer format to a MMM format (i.e. 'Jan').
  Parameters:
    M (int): Month in numerical integer format (i.e. Jan=1).
  Returns: Month in MMM format (i.e. 'Jan').

array2string(S, FWD)
  Converts a string array to a simple string, concatenating its elements.
  Parameters:
    S (string): String array, or string array slice, to turn into a simple string.
    FWD (bool): Boolean defaulted to True. If True the array will be concatenated from head to tail, reversed order if False.
  Returns: Returns the simple string equivalent of the provided string array.

month2number(M)
  Converts a month string in 'MMM' format to its integer equivalent.
  Parameters:
    M (string): Month string, in 'MMM' format.
  Returns: Returns the integer equivalent of the provided Month string in 'MMM' format.

shiftFWD_Days(D)
  Shifts forward the current Date by N days.
  Parameters:
    D (int): Number of days to forward-shift, default is 7.
  Returns: Returns the forward-shifted date in 'MMM %D' format (i.e. Jan 8, Sep 12).

ff_dow(D)
  Converts a numbered day of the week string in format to 'DDD' format (i.e. "1" = Sun).
  Parameters:
    D (string): Numbered day of the week from 1 to 7, starting on Sunday.
  Returns: Returns the day of the week in 'DDD' format (i.e. "Fri").

ff_currency(C)
  Converts a numbered currency string in format to 'CCC' format (i.e. "1" = AUD).
  Parameters:
    C (string): Numbered currency, where "1" = "AUD", "2" = "CAD", "3" = "CHF", "4" = "CNY", "5" = "EUR", "6" = "GBP", "7" = "JPY", "8" = "NZD", "9" = "USD".
  Returns: Returns the currency in 'CCC' format (i.e. "USD").

ff_t(T)
  Converts a time of the day in 'hhmm' format into an intger.
  Parameters:
    T (string): Time of the day string in 'hhmm' format.
  Returns: Returns the time of the day integer in 'hhmm' format, or -1 if all day.

ff_tod(T)
  Converts a time of the day from an integer 'hhmm' format into 'hh:mm' format.
  Parameters:
    T (int)
  Returns: Returns the N Forex Factory News array with time of the day string in 'hh:mm' format, or 'All Day'.

ff_impact(I)
  Converts a number from 1 to 4 to a relative color based on Forex Factory Impact types.
  Parameters:
    I (string): Impact number string from 1 to 4, where "1" = Holiday, "2" = Low Impact, "3" = Medium Impact, "4" = High Impact.
  Returns: Returns the color associated to the impact number based on Forex Factory Impact types.

ff_tmst(D, T)
  Parameters:
    D (string)
    T (string)

decode(ID)
  Decodes TOODEGREES_FOREX_FACTORY_SLOT_n Symbols' Pine Seeds data into Forex Factory News Events.
  Parameters:
    ID (int): Identifier of the Forex Factory News Event, in "DCHHMMI%T" format (D = day of the week from 1 to 7, C = currency from 1 to 9, HHMM = hour:minute in 24h, I = impact from 1 to 4, %T = event title ID) .
  Returns: Returns the Forex Factory News Event.

method pullNews(N, n)
  Decodes the Forex Factory News Event and adds it to the Forex Factory News array.
  Namespace types: ffUtil.News
  Parameters:
    N (News type from toodegrees/forex_factory_utility/1): Forex Factory News array.
    n (float): imported data from custom feed.
  Returns: void

method readNews(N, S)
  Pulls the individual Forex Factory News Event from the custom data feed format (joint News string), decodes them and adds them to the Forex Factory News array.
  Namespace types: ffUtil.News
  Parameters:
    N (News type from toodegrees/forex_factory_utility/1): Forex Factory News array.
    S (string): joint string of the imported data from custom feed.
  Returns: void

marketClosed(N, S, S1, S2, S3, S4, S5, S6, S7, S8, S9)
  If the current ticker's market is closed, Pine Seeds data will be pushed twice upon new day. This function saves the data pushed from the missing day.
  Parameters:
    N (News type from toodegrees/forex_factory_utility/1): Forex Factory News array.
    S (string): String array containing the Pine Seeds daya from the missing day.
    S1 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_1.
    S2 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_2.
    S3 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_3.
    S4 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_4.
    S5 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_5.
    S6 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_6.
    S7 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_7.
    S8 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_8.
    S9 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_9.
  Returns: Updated string array containing the Pine Seeds daya from the missing day.
Versionsinformation:
v2

Updated:
method pullNews(N, n)
  Decodes the Forex Factory News Event and adds it to the Forex Factory News array.
  Namespace types: ffUtil.News
  Parameters:
    N (News type from toodegrees/forex_factory_utility/2): Forex Factory News array.
    n (float): imported data from custom feed.
  Returns: void

method readNews(N, S)
  Pulls the individual Forex Factory News Event from the custom data feed format (joint News string), decodes them and adds them to the Forex Factory News array.
  Namespace types: ffUtil.News
  Parameters:
    N (News type from toodegrees/forex_factory_utility/2): Forex Factory News array.
    S (string): joint string of the imported data from custom feed.
  Returns: void

marketClosed(N, S, S1, S2, S3, S4, S5, S6, S7, S8, S9)
  If the current ticker's market is closed, Pine Seeds data will be pushed twice upon new day. This function saves the data pushed from the missing day.
  Parameters:
    N (News type from toodegrees/forex_factory_utility/2): Forex Factory News array.
    S (string): String array containing the Pine Seeds daya from the missing day.
    S1 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_1.
    S2 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_2.
    S3 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_3.
    S4 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_4.
    S5 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_5.
    S6 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_6.
    S7 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_7.
    S8 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_8.
    S9 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_9.
  Returns: Updated string array containing the Pine Seeds daya from the missing day.
Versionsinformation:
v3

Updated:
method pullNews(N, n)
  Decodes the Forex Factory News Event and adds it to the Forex Factory News array.
  Namespace types: ffUtil.News
  Parameters:
    N (News type from toodegrees/forex_factory_utility/3): Forex Factory News array.
    n (float): imported data from custom feed.
  Returns: void

method readNews(N, S)
  Pulls the individual Forex Factory News Event from the custom data feed format (joint News string), decodes them and adds them to the Forex Factory News array.
  Namespace types: ffUtil.News
  Parameters:
    N (News type from toodegrees/forex_factory_utility/3): Forex Factory News array.
    S (string): joint string of the imported data from custom feed.
  Returns: void

marketClosed(N, S, S1, S2, S3, S4, S5, S6, S7, S8, S9)
  If the current ticker's market is closed, Pine Seeds data will be pushed twice upon new day. This function saves the data pushed from the missing day.
  Parameters:
    N (News type from toodegrees/forex_factory_utility/3): Forex Factory News array.
    S (string): String array containing the Pine Seeds daya from the missing day.
    S1 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_1.
    S2 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_2.
    S3 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_3.
    S4 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_4.
    S5 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_5.
    S6 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_6.
    S7 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_7.
    S8 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_8.
    S9 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_9.
  Returns: Updated string array containing the Pine Seeds daya from the missing day.
Versionsinformation:
v4

Updated:
method pullNews(N, n)
  Decodes the Forex Factory News Event and adds it to the Forex Factory News array.
  Namespace types: ffUtil.News
  Parameters:
    N (News type from toodegrees/forex_factory_utility/4): Forex Factory News array.
    n (float): imported data from custom feed.
  Returns: void

method readNews(N, S)
  Pulls the individual Forex Factory News Event from the custom data feed format (joint News string), decodes them and adds them to the Forex Factory News array.
  Namespace types: ffUtil.News
  Parameters:
    N (News type from toodegrees/forex_factory_utility/4): Forex Factory News array.
    S (string): joint string of the imported data from custom feed.
  Returns: void

marketClosed(N, S, S1, S2, S3, S4, S5, S6, S7, S8, S9)
  If the current ticker's market is closed, Pine Seeds data will be pushed twice upon new day. This function saves the data pushed from the missing day.
  Parameters:
    N (News type from toodegrees/forex_factory_utility/4): Forex Factory News array.
    S (string): String array containing the Pine Seeds daya from the missing day.
    S1 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_1.
    S2 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_2.
    S3 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_3.
    S4 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_4.
    S5 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_5.
    S6 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_6.
    S7 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_7.
    S8 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_8.
    S9 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_9.
  Returns: Updated string array containing the Pine Seeds daya from the missing day.
Versionsinformation:
v5

Updated:
method pullNews(N, n)
  Decodes the Forex Factory News Event and adds it to the Forex Factory News array.
  Namespace types: array
  Parameters:
    N (array type from toodegrees/forex_factory_utility/5): Forex Factory News array.
    n (float): imported data from custom feed.
  Returns: void

method readNews(N, S)
  Pulls the individual Forex Factory News Event from the custom data feed format (joint News string), decodes them and adds them to the Forex Factory News array.
  Namespace types: array
  Parameters:
    N (array type from toodegrees/forex_factory_utility/5): Forex Factory News array.
    S (string): joint string of the imported data from custom feed.
  Returns: void

marketClosed(N, S, S1, S2, S3, S4, S5, S6, S7, S8, S9)
  If the current ticker's market is closed, Pine Seeds data will be pushed twice upon new day. This function saves the data pushed from the missing day.
  Parameters:
    N (array type from toodegrees/forex_factory_utility/5): Forex Factory News array.
    S (array): String array containing the Pine Seeds daya from the missing day.
    S1 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_1.
    S2 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_2.
    S3 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_3.
    S4 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_4.
    S5 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_5.
    S6 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_6.
    S7 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_7.
    S8 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_8.
    S9 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_9.
  Returns: Updated string array containing the Pine Seeds daya from the missing day.
Versionsinformation:
v6

Updated:
method pullNews(N, n)
  Decodes the Forex Factory News Event and adds it to the Forex Factory News array.
  Namespace types: array
  Parameters:
    N (array type from toodegrees/forex_factory_utility/6): Forex Factory News array.
    n (float): imported data from custom feed.
  Returns: void

method readNews(N, S)
  Pulls the individual Forex Factory News Event from the custom data feed format (joint News string), decodes them and adds them to the Forex Factory News array.
  Namespace types: array
  Parameters:
    N (array type from toodegrees/forex_factory_utility/6): Forex Factory News array.
    S (string): joint string of the imported data from custom feed.
  Returns: void

marketClosed(N, S, S1, S2, S3, S4, S5, S6, S7, S8, S9)
  If the current ticker's market is closed, Pine Seeds data will be pushed twice upon new day. This function saves the data pushed from the missing day.
  Parameters:
    N (array type from toodegrees/forex_factory_utility/6): Forex Factory News array.
    S (array): String array containing the Pine Seeds daya from the missing day.
    S1 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_1.
    S2 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_2.
    S3 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_3.
    S4 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_4.
    S5 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_5.
    S6 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_6.
    S7 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_7.
    S8 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_8.
    S9 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_9.
  Returns: Updated string array containing the Pine Seeds daya from the missing day.
Versionsinformation:
v7

Updated:
method pullNews(N, n)
  Decodes the Forex Factory News Event and adds it to the Forex Factory News array.
  Namespace types: array
  Parameters:
    N (array type from toodegrees/forex_factory_utility/7): Forex Factory News array.
    n (float): imported data from custom feed.
  Returns: void

method readNews(N, S)
  Pulls the individual Forex Factory News Event from the custom data feed format (joint News string), decodes them and adds them to the Forex Factory News array.
  Namespace types: array
  Parameters:
    N (array type from toodegrees/forex_factory_utility/7): Forex Factory News array.
    S (string): joint string of the imported data from custom feed.
  Returns: void

marketClosed(N, S, S1, S2, S3, S4, S5, S6, S7, S8, S9)
  If the current ticker's market is closed, Pine Seeds data will be pushed twice upon new day. This function saves the data pushed from the missing day.
  Parameters:
    N (array type from toodegrees/forex_factory_utility/7): Forex Factory News array.
    S (array): String array containing the Pine Seeds daya from the missing day.
    S1 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_1.
    S2 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_2.
    S3 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_3.
    S4 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_4.
    S5 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_5.
    S6 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_6.
    S7 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_7.
    S8 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_8.
    S9 (string): Data coming from TOODEGREES_FOREX_FACTORY_SLOT_9.
  Returns: Updated string array containing the Pine Seeds daya from the missing day.
Versionsinformation:
v8

Updated:
method pullNews(N, n)
  Decodes the Forex Factory News Event and adds it to the Forex Factory News array.
  Namespace types: array
  Parameters:
    N (array type from toodegrees/forex_factory_utility/8): Forex Factory News array.
    n (float): imported data from custom feed.
  Returns: void

method readNews(N, S)
  Pulls the individual Forex Factory News Event from the custom data feed format (joint News string), decodes them and adds them to the Forex Factory News array.
  Namespace types: array
  Parameters:
    N (array type from toodegrees/forex_factory_utility/8): Forex Factory News array.
    S (string): joint string of the imported data from custom feed.
  Returns: void

Removed:
marketClosed(N, S, S1, S2, S3, S4, S5, S6, S7, S8, S9)
  If the current ticker's market is closed, Pine Seeds data will be pushed twice upon new day. This function saves the data pushed from the missing day.
Versionsinformation:
v9

Updated:
method pullNews(N, n)
  Decodes the Forex Factory News Event and adds it to the Forex Factory News array.
  Namespace types: array
  Parameters:
    N (array type from toodegrees/forex_factory_utility/9): Forex Factory News array.
    n (float): imported data from custom feed.
  Returns: void

method readNews(N, S)
  Pulls the individual Forex Factory News Event from the custom data feed format (joint News string), decodes them and adds them to the Forex Factory News array.
  Namespace types: array
  Parameters:
    N (array type from toodegrees/forex_factory_utility/9): Forex Factory News array.
    S (string): joint string of the imported data from custom feed.
  Returns: void
Versionsinformation:
v10

Updated:
method pullNews(N, n)
  Decodes the Forex Factory News Event and adds it to the Forex Factory News array.
  Namespace types: array
  Parameters:
    N (array type from toodegrees/forex_factory_utility/10): Forex Factory News array.
    n (float): imported data from custom feed.
  Returns: void

method readNews(N, S)
  Pulls the individual Forex Factory News Event from the custom data feed format (joint News string), decodes them and adds them to the Forex Factory News array.
  Namespace types: array
  Parameters:
    N (array type from toodegrees/forex_factory_utility/10): Forex Factory News array.
    S (string): joint string of the imported data from custom feed.
  Returns: void
Versionsinformation:
v11

Updated:
method pullNews(N, n)
  Decodes the Forex Factory News Event and adds it to the Forex Factory News array.
  Namespace types: array
  Parameters:
    N (array type from toodegrees/forex_factory_utility/11): Forex Factory News array.
    n (float): imported data from custom feed.
  Returns: void

method readNews(N, S)
  Pulls the individual Forex Factory News Event from the custom data feed format (joint News string), decodes them and adds them to the Forex Factory News array.
  Namespace types: array
  Parameters:
    N (array type from toodegrees/forex_factory_utility/11): Forex Factory News array.
    S (string): joint string of the imported data from custom feed.
  Returns: void
Versionsinformation:
v12

Updated:
method pullNews(N, n)
  Decodes the Forex Factory News Event and adds it to the Forex Factory News array.
  Namespace types: array
  Parameters:
    N (array type from toodegrees/forex_factory_utility/12): Forex Factory News array.
    n (float): imported data from custom feed.
  Returns: void

method readNews(N, S)
  Pulls the individual Forex Factory News Event from the custom data feed format (joint News string), decodes them and adds them to the Forex Factory News array.
  Namespace types: array
  Parameters:
    N (array type from toodegrees/forex_factory_utility/12): Forex Factory News array.
    S (string): joint string of the imported data from custom feed.
  Returns: void
Versionsinformation:
v13

Updated:
method pullNews(N, n)
  Decodes the Forex Factory News Event and adds it to the Forex Factory News array.
  Namespace types: array
  Parameters:
    N (array type from toodegrees/forex_factory_utility/13): Forex Factory News array.
    n (float): imported data from custom feed.
  Returns: void

method readNews(N, S)
  Pulls the individual Forex Factory News Event from the custom data feed format (joint News string), decodes them and adds them to the Forex Factory News array.
  Namespace types: array
  Parameters:
    N (array type from toodegrees/forex_factory_utility/13): Forex Factory News array.
    S (string): joint string of the imported data from custom feed.
  Returns: void
Versionsinformation:
v14

Updated:
method pullNews(N, n)
  Decodes the Forex Factory News Event and adds it to the Forex Factory News array.
  Namespace types: array
  Parameters:
    N (array type from toodegrees/forex_factory_utility/14): Forex Factory News array.
    n (float): imported data from custom feed.
  Returns: void

method readNews(N, S)
  Pulls the individual Forex Factory News Event from the custom data feed format (joint News string), decodes them and adds them to the Forex Factory News array.
  Namespace types: array
  Parameters:
    N (array type from toodegrees/forex_factory_utility/14): Forex Factory News array.
    S (string): joint string of the imported data from custom feed.
  Returns: void
Versionsinformation:
v15
Versionsinformation:
v16
Versionsinformation:
v17
Versionsinformation:
v18

homo faber fortunæ suæ
Pinebibliotek

I sann TradingView-anda har författaren publicerat denna Pine-kod som ett bibliotek med öppen källkod så att andra Pine-programmerare från vår community kan återanvända den. Hatten av för författaren! Du kan använda det här biblioteket privat eller i andra publikationer med öppen källkod, men återanvändning av den här koden i en publikation regleras av våra ordningsregler.

Frånsägelse av ansvar

Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.

Vill du använda det här biblioteket?

Kopiera följande rad och klistra in det i ditt skript.