toodegrees

forex_factory_decoding

toodegrees 已更新   
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.
發布通知:
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.
發布通知:
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.
發布通知:
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.
發布通知:
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.
發布通知:
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.
發布通知:
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.
發布通知:
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.
發布通知:
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
發布通知:
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
發布通知:
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
發布通知:
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
發布通知:
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
發布通知:
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
發布通知:
v15

homo faber fortunæ suæ
Pine腳本庫

本著真正的TradingView精神,作者將此Pine代碼以開源腳本庫發布,以便我們社群的其他Pine程式設計師可以重用它。向作者致敬!您可以私下或在其他開源出版物中使用此庫,但在出版物中重用此代碼受網站規則約束。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想使用這個腳本庫嗎?

複製以下行並將其黏貼到您的腳本中。