🔢DATA SOURCE
Code Zero Visual Trading for TradingView
Association
DATA SOURCE is a constant.
The DATA SOURCE module is like a preparation table for a chef, where they can chop ingredients and mix them before cooking the dish. Here you can take data from other indicators, combine or modify them using mathematical operations, before using them in the main module CONDITION MANAGER or any other module (even another DATA SOURCE) to create rules (RULE) or constants (CONSTANT). This versatile DATA SOURCE module can be used as a memory location or stack.

CONSTANT mode is the main mode of module operation in which mathematical operations are performed on different data sources.
For example, if you need to check if the trading volume (Volume) is greater than the moving average (MA) value by 50% (1.5 times), you first use the DATA SOURCE module to calculate 1.5 * MA(50). Then you use the resulting value in CONDITION MANAGER as one of the external input data in RULE to compare with the trading volume. This helps you precisely adjust the conditions for your trading strategy.
Attention
You can read the order in which the calculations are made and a detailed description of the fields here.


MEMORY mode is a mode of operation based on the principle of a memory cell into which a value can be written and read.

REMEBER SIGNAL - Source that activates writing the value to the memory of the current DATA SOURCE calculation.
CLEAR SIGNAL - Source that activates clearing the value in memory and resetting it to 0.
STACK mode is a queue where you can put values in and take them back out. It works in a “last put in” - “first take out” mode.

PUT SIGNAL - Source that activates writing the current DATA SOURCE value calculation to the stack.
GET SIGNAL - A source that takes the last value from the stack, returns it to the output, and removes it from the stack.
CLEAR SIGNAL - A source that returns the last value from the stack and clears the entire stack.
Send values until the next signal - Return the last value from the stack on all bars until the next signal (true) or only on the bar where there was a signal (false)?
The DATA SOURCE module has three outputs that return the result of its operation for each of the modes of operation.

Last updated