PINE LIBRARY
تم تحديثه arsenal

Library "arsenal"
This library is a collection of weapons that will help us win the war against the market.
isNewbar(res, timezone) Checks if the res is in new bar at the current timeframe
Parameters:
res: - resolution of the bar to check if new
timezone: - timezone of the resolution
Returns: ch: - 1=true, 0=false
This library is a collection of weapons that will help us win the war against the market.
isNewbar(res, timezone) Checks if the res is in new bar at the current timeframe
Parameters:
res: - resolution of the bar to check if new
timezone: - timezone of the resolution
Returns: ch: - 1=true, 0=false
ملاحظات الأخبار
v2Added:
toNumberString(number) Converts the number into a human readable format
Parameters:
number: - number in float
Returns: string: - number in human readable format
ملاحظات الأخبار
v3Added:
toPercentString(number) Converts the number into a human readable % format
Parameters:
number: - number in float
Returns: string: - number in % that is readable to human
ملاحظات الأخبار
v4Added:
show_alerts(title) Show an alert based on the bar's close
Parameters:
title: - title of the alert
Returns: label
percentChange(prev, new) Converts % change
Parameters:
prev: - previous value
new: - new value
Returns: float: - % change in float
ملاحظات الأخبار
v5Added:
showAlerts(title) Show an alert based on the bar's close
Parameters:
title: - title of the alert
Returns: label
Removed:
show_alerts(title) Show an alert based on the bar's close
ملاحظات الأخبار
v6added isNewbarSecurity -> to check if it's a new bar at this timeframe. This function is using the request security so be careful using this a lot.
ملاحظات الأخبار
v7removed isnewbar security
ملاحظات الأخبار
v8Added:
numberBeforeDecimalPoint(number) Counts the number of digits before decimal point
Parameters:
number: - in float
Returns: number of digits
numberAfterDecimalPoint(number) Counts the number of digits after decimal point
Parameters:
number: - in float
Returns: number of digits
roundToMinTick(number, minTick) Rounds number to same decimals of mintick
Parameters:
number: - in float, number to round
minTick: - in float, decimals to use
Returns: rounded number
ملاحظات الأخبار
v9Added:
toPriceFormat(price) Rounds number to price format (same decimals as the current asset)
Parameters:
price: - the number to format
Returns: formatted price
toPriceFormatString(price) Rounds number to price format (same decimals as the current asset)
Parameters:
price: - the number to format
Returns: formatted price to string
ملاحظات الأخبار
v10Added:
getAverageFromArray(array) Gets the average of all the values from the array
Parameters:
array: - in float[]
Returns: the avarage mean
getHighestFromArray(array) Gets the highest of all the values from the array
Parameters:
array: - in float[]
Returns: the highest value from the array
getLowestFromArray(array) Gets the lowest of all the values from the array
Parameters:
array: - in float[]
Returns: the lowest value from the array
toNumberStringWithoutDecimal(number) Converts the number into a human readable format but also dropping decimals
Parameters:
number: - number in float
Returns: string: - number in human readable format
ملاحظات الأخبار
v11ملاحظات الأخبار
v12Added:
timeframeToString(string) Converts timeframe into human readable string
Parameters:
string: - timeframe
Returns: timeframe in human readable string
ملاحظات الأخبار
v13Added:
getUnitLabel() Gets the unit of time based on current timeframe on chart
Returns: unit of time
ملاحظات الأخبار
v14Added:
getTimeUnit() Gets the unit of time
Returns: unit of time
getTimeUnitLabel() Gets the label of unit of time based on current timeframe on chart
Returns: unit of time
convertToTimeUnit(count) Converts to unit based on bar
Parameters:
count: - in float
Returns: unit of time
Removed:
getUnitLabel() Gets the unit of time based on current timeframe on chart
ملاحظات الأخبار
v15Added:
getTimeUnitLabelRaw() Gets the label of unit of time based on current timeframe on chart
Returns: unit of time
multiplyTimeframe() Multiply the current chart's timeframe
Returns: new timeframe
ملاحظات الأخبار
v16Added:
normalize(src, min, max)
Parameters:
src: - source to normalize like macd histogram
min: - minimum value
max: - maximum value
Returns: normalized value
ملاحظات الأخبار
v17Added:
getTimeUnit_timeframe(_tf) Gets the unit of time
Parameters:
_tf: - timeframe in string
Returns: unit of time
get_ms_timeframe_value(_tf) Gets the ms value equivalent of the given timeframe
Parameters:
_tf: - timeframe in string
Returns: float in ms
get_ms_timeframes_ratio(tf_1, tf_2) Gets the ratio of 2 timeframes (tf1 / tf2)
Parameters:
tf_1: - timeframe in string
tf_2: - timeframe in string
Returns: ratio in float
ملاحظات الأخبار
v18ملاحظات الأخبار
v19Added:
fixTimeframe(_inputTF) Fix timeframe
Parameters:
_inputTF: - input timeframe
isSameTimeframe(_inputTF, _inputTF2) Compares if the2 input timeframes are the same...
Parameters:
_inputTF: - input timeframe
_inputTF2: - input timeframe 2
ملاحظات الأخبار
v20ملاحظات الأخبار
v21ملاحظات الأخبار
v22Added:
isEqualToCurrentTF(_inputTF) Is input timeframe equal to current timeframe
Parameters:
_inputTF: - input timeframe
ملاحظات الأخبار
v23Added:
get_line_styles_string() Gets the line styles in string
Returns: line styles in string
get_label_styles_symbol_string() Gets the symbol-label styles in string
Returns: symbol-label styles in string
get_label_styles_text_string() Gets the text-label styles in string
Returns: text-label styles in string
get_line_styles_value(type) Get's the equivalent value of line.style_x string
Parameters:
type: - line_style type in string
Returns: corresponding line.style_x
get_label_styles_symbol_value(type) Get's the equivalent value of label.style_x symbol string
Parameters:
type: - label_style symbol type in string
Returns: corresponding label.style_x symbol
get_label_styles_text_value(type) Get's the equivalent value of label.style_x text string
Parameters:
type: - label_style text type in string
Returns: corresponding label.style_x text
ملاحظات الأخبار
v24Added:
timetoexit_in_minutes(type) Get the time to exit from timenow + minutes
Parameters:
type: - minutes
Returns: time to exit
timetoexit_in_hours(type) Get the time to exit from timenow + hours
Parameters:
type: - hours
Returns: time to exit
ملاحظات الأخبار
v25- fixed bug in v24 timetoexit_in_minutes (timenow to time)
ملاحظات الأخبار
v26Added:
is_valid(numstring)
Check if condition is valid
Parameters:
numstring: - bar indices separated by pipe (|)
Returns: if condition is valid on given indices
مكتبة باين
كمثال للقيم التي تتبناها TradingView، نشر المؤلف شيفرة باين كمكتبة مفتوحة المصدر بحيث يمكن لمبرمجي باين الآخرين من مجتمعنا استخدامه بحرية. تحياتنا للمؤلف! يمكنك استخدام هذه المكتبة بشكل خاص أو في منشورات أخرى مفتوحة المصدر، ولكن إعادة استخدام هذا الرمز في المنشورات تخضع لقواعد الموقع.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
مكتبة باين
كمثال للقيم التي تتبناها TradingView، نشر المؤلف شيفرة باين كمكتبة مفتوحة المصدر بحيث يمكن لمبرمجي باين الآخرين من مجتمعنا استخدامه بحرية. تحياتنا للمؤلف! يمكنك استخدام هذه المكتبة بشكل خاص أو في منشورات أخرى مفتوحة المصدر، ولكن إعادة استخدام هذا الرمز في المنشورات تخضع لقواعد الموقع.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.