This script is to help people with converting arrays to Simple Moving Average and Exponential Moving Average arrays. It is the same as using ta.sma() or ta.ema() in v5 with series but it takes an array as input instead. Both functions have inbuilt bad-input checking logic to ensure that the period length is not too high or too low - which could give unwanted results. If such values are used, the functions will output an array of the same length with NaN values. The EMA function also has an optional argument called sma_seed, which determines whether the first value in the output array will be the SMA of the first value from the input array (true) or the first value itself (false). Both functions work independently of one another, all you have to do is copy the entire function into your code and off you go! I can add more functions such as RMA or VWMA if there is demand, let me know and leave a like! ~ if you want.
סקריפט קוד פתוח
ברוח TradingView אמיתית, היוצר של הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יכולים לבדוק ולאמת את הפונקציונליות שלו. כל הכבוד למחבר! למרות שאתה יכול להשתמש בו בחינם, זכור שפרסום מחדש של הקוד כפוף לכללי הבית שלנו.
לגישה מהירה לגרף, הוסף את הסקריפט הזה למועדפים שלך - למד עוד כאן.
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.
ברוח TradingView אמיתית, היוצר של הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יכולים לבדוק ולאמת את הפונקציונליות שלו. כל הכבוד למחבר! למרות שאתה יכול להשתמש בו בחינם, זכור שפרסום מחדש של הקוד כפוף לכללי הבית שלנו.
לגישה מהירה לגרף, הוסף את הסקריפט הזה למועדפים שלך - למד עוד כאן.
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.