OPEN-SOURCE SCRIPT

Pine Execution Map

1 597
Pine Script Execution Map

Overview:
This is an educational script for Pine Script developers. The script includes data structure, functions/methods, and process to capture and print Pine Script execution map of functions called while pine script execution.

Map of execution is produced for last/latest candle execution.

The script also has example code to call execution map methods and generate Pine Execution map.

Use cases:
  • Pine script developers can get view of how the functions are called
  • This can also be used while debugging the code and know which functions are called vs what developer expect code to do
  • One can use this while using any of the open source published script and understand how public script is organized and how functions of the script are called.



Code components:

User defined type
Pine Script®


method called internally by other methods to generate level of function being executed
Pine Script®


Method called from main/global scope to record execution of main scope code. There should be only one call to this method at the start of global scope.
Pine Script®


Method called from main/global scope to record end of execution of main scope code. There should be only one call to this method at the end of global scope.
Pine Script®


Method called from start of each function to record execution of function code
Pine Script®


Method called from end of each function to record end of execution of function code
Pine Script®


Pine code which generates execution map and show it as a label tooltip.
Pine Script®


Snapshot 1:
This is the output of the script and can be viewed by hovering mouse pointer over the blue color diamond shaped label
快照

Snapshot 2:
How to read the Pine execution map
快照

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。