Adaptive MFT Extremum Pivots My 1-minute introduction video (Sorry for accent) Relevance to Elite Trader: I present my open-source Adaptive MFT Extremum Pivots indicator, crafted in TradingView's Pine script language. I invite you to explore its documentation and incorporate it into your trading strategies for identifying support and resistance levels. This thread serves as an open platform for your feedback, enabling me to refine the indicator based on your insights and preferences. I am also eager to connect with individuals who possess innovative ideas for further indicator development. Your collaboration will contribute to the creation of even more valuable trading tools. Overview: The Adaptive MFT Extremum Pivots indicator, developed by Elysian_Mind (me), is a powerful Pine Script tool that dynamically displays key market levels, including Monthly Highs/Lows, Weekly Extremums, Pivot Points, and dynamic Resistances/Supports. The term "dynamic" emphasizes the adaptive nature of the calculated levels, ensuring they reflect real-time market conditions. I thank Zandalin for the excellent table design. --- Chart Explanation: It's the utility window in the bottom right corner The table, a visual output of the script, is conveniently positioned in the bottom right corner of the screen, showcasing the indicator's dynamic results. The configuration block, elucidated in the documentation, empowers users to customize the display position. The default placement is at the bottom right, exemplified in the accompanying chart. The deliberate design ensures that the table does not obscure the candlesticks, with traders commonly situating it outside the candle area. However, the flexibility exists to overlay the table onto the candles. Thanks to transparent cells, the underlying chart remains visible even with the table displayed atop. In the initial column of the table, users will find labels for the monthly high and low, accompanied by their respective numerical values. The default precision for these values is set at #.###, yet this can be adjusted within the configuration block to suit markets with varying degrees of volatility. Mirroring this layout, the last column of the table presents the weekly high and low data. This arrangement is part of the upper half of the table. Transitioning to the lower half, users encounter the resistance levels in the first column and the support levels in the last column. At the center of the table, prominently displayed, is the monthly pivot point. For a comprehensive understanding of the calculations governing these values, users can refer to the documentation. Importantly, users retain the freedom to modify these mathematical calculations, with the table seamlessly updating to reflect any adjustments made. Noteworthy is the table's persistence; it continues to display reliably even if users choose to customize the mathematical calculations, providing a consistent and adaptable tool for informed decision-making in trading. This detailed breakdown offers traders a clear guide to interpreting the information presented by the table, ensuring optimal use and understanding of the Adaptive MFT Extremum Pivots indicator. --- Usage: Table Layout: The table is a crucial component of this indicator, providing a structured representation of various market levels. Color-coded cells enhance readability, with blue indicating key levels and a semi-transparent background to maintain chart visibility. 1. Utilizing a Table for Enhanced Visibility: In presenting this wealth of information, the indicator employs a table format beneath the chart. The use of a table is deliberate and offers several advantages: 2. Structured Organization: The table organizes the diverse data into a structured format, enhancing clarity and making it easier for traders to locate specific information. 3. Concise Presentation: A table allows for the concise presentation of multiple data points without cluttering the main chart. Traders can quickly reference key levels without distraction. 4. Dynamic Visibility: As the market dynamically evolves, the table seamlessly updates in real-time, ensuring that the most relevant information is readily visible without obstructing the candlestick chart. 5. Color Coding for Readability: Color-coded cells in the table not only add visual appeal but also serve a functional purpose by improving readability. Key levels are easily distinguishable, contributing to efficient analysis. Data Values: Numerical values for each level are displayed in their respective cells, with precision defined by the iPrecision configuration parameter. Configuration: Code: // User configuration: You can modify this part without code understanding // Table location configuration // Position: Table const string iPosition = position.bottom_right // Width: Table borders const int iBorderWidth = 1 // Color configuration // Color: Borders const color iBorderColor = color.new(color.white, 75) // Color: Table background const color iTableColor = color.new(#2B2A29, 25) // Color: Title cell background const color iTitleCellColor = color.new(#171F54, 0) // Color: Characters const color iCharColor = color.white // Color: Data cell background const color iDataCellColor = color.new(#25456E, 0) // Precision: Numerical data const int iPrecision = 3 // End of configuration The code includes a configuration block where users can customize the following parameters: Precision of Numerical Table Data (iPrecision): Code: // Precision: Numerical data const int iPrecision = 3 This parameter (iPrecision) sets the precision of the numerical values displayed in the table. The default value is 3, displaying numbers in #.### format. Position of the Table (iPosition): Code: // Position: Table const string iPosition = position.bottom_right This parameter (iPosition) sets the position of the table on the chart. The default is position.bottom_right. Color preferences Table borders (iBorderColor): Code: // Color: Borders const color iBorderColor = color.new(color.white, 75) This parameters (iBorderColor) sets the color of the borders everywhere within the window. Table Background (iTableColor): Code: // Color: Table background const color iTableColor = color.new(#2B2A29, 25) This is the background color of the table. If you've got cells without custom background color, this color will be their background. Title Cell Background (iTitleCellColor): Code: // Color: Title cell background const color iTitleCellColor = color.new(#171F54, 0) This is the background color the title cells. You can set the background of data cells and text color elsewhere. Text (iCharColor): Code: // Color: Characters const color iCharColor = color.white This is the color of the text - titles and data - within the table window. If you change any of the background colors, you might want to change this parameter to ensure visibility. Data Cell Background: (iDataCellColor): Code: // Color: Data cell background const color iDataCellColor = color.new(#25456E, 0) The data cells have a background color to differ from title cells. You can configure this is a different parameter (iDataColor). You might even set the same color for data as for the titles if you will. --- Mathematical Background: Monthly and Weekly Extremums: The indicator calculates the High (H) and Low (L) of the previous month and week, ensuring accurate representation of these key levels. Standard Monthly Pivot Point: The standard pivot point is determined based on the previous month's data using the formula: PivotPoint = (PrevMonthHigh + PrevMonthLow + Close[1]) / 3 Monthly Pivot Points (R1, R2, R3, S1, S2, S3): Additional pivot points are calculated for Resistances (R) and Supports (S) using the monthly data: R1 = 2 * PivotPoint - PrevMonthLow S1 = 2 * PivotPoint - PrevMonthHigh R2 = PivotPoint + (PrevMonthHigh - PrevMonthLow) S2 = PivotPoint - (PrevMonthHigh - PrevMonthLow) R3 = PrevMonthHigh + 2 * (PivotPoint - PrevMonthLow) S3 = PrevMonthLow - 2 * (PrevMonthHigh - PivotPoint) --- Code Explanation and Interpretation: The table displayed beneath the chart provides the following information: Monthly Extremums: (H) High of the previous month (L) Low of the previous month Code: // Function to get the high and low of the previous month getPrevMonthHighLow() => var float prevMonthHigh = na var float prevMonthLow = na monthChanged = month(time) != month(time[1]) if (monthChanged) prevMonthHigh := high[1] prevMonthLow := low[1] [prevMonthHigh, prevMonthLow] Weekly Extremums: (H) High of the previous week (L) Low of the previous week Code: // Function to get the high and low of the previous week getPrevWeekHighLow() => var float prevWeekHigh = na var float prevWeekLow = na weekChanged = weekofyear(time) != weekofyear(time[1]) if (weekChanged) prevWeekHigh := high[1] prevWeekLow := low[1] [prevWeekHigh, prevWeekLow] Monthly Pivots: Pivot: Standard pivot point based on the previous month's data Code: // Function to calculate the standard pivot point based on the previous month's data getStandardPivotPoint() => [prevMonthHigh, prevMonthLow] = getPrevMonthHighLow() pivotPoint = (prevMonthHigh + prevMonthLow + close[1]) / 3 Resistances: R3, R2, R1: Monthly resistance levels Code: // Function to calculate additional pivot points based on the monthly data getMonthlyPivotPoints() => [prevMonthHigh, prevMonthLow] = getPrevMonthHighLow() pivotPoint = (prevMonthHigh + prevMonthLow + close[1]) / 3 r1 = (2 * pivotPoint) - prevMonthLow s1 = (2 * pivotPoint) - prevMonthHigh r2 = pivotPoint + (prevMonthHigh - prevMonthLow) s2 = pivotPoint - (prevMonthHigh - prevMonthLow) r3 = prevMonthHigh + 2 * (pivotPoint - prevMonthLow) s3 = prevMonthLow - 2 * (prevMonthHigh - pivotPoint) [pivotPoint, r1, s1, r2, s2, r3, s3] Initializing and Populating the Table: The myTable variable initializes the table with a blue background, and subsequent table.cell functions populate the table with headers and data. Code: // Initialize the table with adjusted bgcolor var myTable = table.new(position = iPosition, columns = 5, rows = 10, bgcolor = color.new(color.blue, 90), border_width = 1, border_color = color.new(color.blue, 70)) Dynamic Data Population: Data is dynamically populated in the table using the calculated values for Monthly Extremums, Weekly Extremums, Monthly Pivot Points, Resistances, and Supports. Code: // Add rows dynamically with data [prevMonthHigh, prevMonthLow] = getPrevMonthHighLow() [prevWeekHigh, prevWeekLow] = getPrevWeekHighLow() [pivotPoint, r1, s1, r2, s2, r3, s3] = getMonthlyPivotPoints() --- Conclusion: The Adaptive MFT Extremum Pivots indicator offers traders a detailed and clear representation of critical market levels, empowering them to make informed decisions. However, users should carefully analyze the market and consider their individual risk tolerance before making any trading decisions. The indicator's disclaimer emphasizes that it is not investment advice, and the author and script provider are not responsible for any financial losses incurred. --- Disclaimer: This indicator is not investment advice. Trading decisions should be made based on a careful analysis of the market and individual risk tolerance. The author and script provider are not responsible for any financial losses incurred. VIEW SOURCE CODE Kind regards, Ely
Is there a way to export indicator values to console or csv so that we might do our own data analysis?
When it comes to simple data extraction and analysis, Pine Script's Print() or Plot() functions are adequate. Here's an example: Code: //@version=5 //@indicator // RSI indicator rsi = ta.rsi(close, 14) // Display the current value of the RSI indicator to the console every time it crosses above 70 if rsi > 70: Print(rsi) However, when dealing with larger datasets, it is advisable to utilize web scraping tools such as Beautiful Soup or Selenium to extract data from TradingView charts. Here's a scalable data processing method I usually use for analytics: I employ a communication protocol like TCP or WebSockets that enables the transmission of the extracted data in a suitable format such as JSON or XML. I prefer WebSockets and JSON because these are the same protocols I use in my algorithmic trading bots. Subsequently, the Python program can receive, parse, process, and store the data for further analysis or trading strategies. But remember, Big Data isn't only about the amount of information. It's about the process of keeping a large amount of data up to date. To ensure real-time data updates, implementing a mechanism to continuously monitor the TradingView chart and trigger data extraction and processing as needed is essential. This approach facilitates the integration of Pine indicator insights into your Python program for advanced analytics and informed trading decision-making. Let me know if that's helpful. If it sounds too technical, I'm about to add an export function to the indicator. You could help if you shared what programming language is your preference and what scale you want to use in your analytics.
so let me ask why do all that ? multicharts.net or amibroker will handle anything you want to build just about. i say i don't have to make my own toilet paper to wipe my ass, store bought is just fine. been down the software development hole with traderware and tradevec and lost 20 years spending trading profits when i should have been just trading. spoiler alert there is nothing in data alone other than dead dumb price, nothing mystical to discover in price alone. you want to find a durable edge, understand what drives what to do what. master one data stream and meet it's master then you will not need big data you will just need to pull back the curtains and see the machine. it's a super ugly thang called human emotions, that's what data is in fact. m
How exactly do you imagine HFT without software development? HFT is a competitive domain. I don't see how you would take an edge against your competitors if you bought the same box. In my experience, knowledge pays off when your original bot outperforms everyone else's bots.
My vampire bots algorithmically pick off commercial bots. Haha. I believe some posts above you wrote about sentiment ("pull back the curtains and see the machine"), but all corporations I know use automated systems to do their sentiment analytics. These machine agents can analyze data behind the trading engine. I don't see how I analyzed X tweets, TV ideas, YT analytics, FB posts, and media news without my systems. There are too many platforms and many news to follow with human eyes.
i was more thinking along the lines of broad market sentiment indices to figure what the true market is as opposed to where the actual price level is. so within the actual data when it lines up with the true market that is a indication where you we can accept the dog on the leash will be wandering while it's owner will still be walking down the actual sidewalk. so think of the spx as the dog owner and the sp futures as the dog on the leash, he will be wandering around but snapped back to pathway he has to travel. now to add to this complexity think that the dogs wondering and persistence, attracting the owner to further investigate and so the owner gets off track like the dog. this maybe valid or it maybe nothing, and so the spx and the sp futures will both be brought back to the sidewalk from the call of an even higher authority and or a mix of related broad market products. m of course this is not limited to cash and futures, all markets have influencers that can get a market over stimulated.
It is technically challenging. I hung up my programming hat a long time ago but recently exploring python implemented through Quantconnect as a side project. However I do all my charting on Tradingview, so there's a disconnect with pursuing that (Quantconnect) and the manual annotations done in TV. I do most of my analytics on googlesheets. You do address a major pain point of how to sync real-time data updates in an automated way to something like googlesheets. Currently this middleware is something that is diy. Looking forward to when you implement this export function. Good work. offtopic: Would Beautiful Soup be the way to extract the titles from Drawings in TV's Object Model? The values of the drawings themselves seem to be encapsulated. Drawings like the Position Tool's values don't seem to be accessible. Any insight you could share on these two separate problems?
BS4 won't work on most websites these days as everything is dynamic. You could try Selenium (also headless).