Fibonacci-Only StrategyFibonacci-Only Strategy
This script is a custom trading strategy designed for traders who leverage Fibonacci retracement levels to identify potential trade entries and exits. The strategy is versatile, allowing users to trade across multiple timeframes, with built-in options for dynamic stop loss, trailing stops, and take profit levels.
Key Features:
Custom Fibonacci Levels:
This strategy calculates three specific Fibonacci retracement levels: 19%, 82.56%, and the reverse 19% level. These levels are used to identify potential areas of support and resistance where price reversals or breaks might occur.
The Fibonacci levels are calculated based on the highest and lowest prices within a 100-bar period, making them dynamic and responsive to recent market conditions.
Dynamic Entry Conditions:
Touch Entry: The script enters long or short positions when the price touches specific Fibonacci levels and confirms the move with a bullish (for long) or bearish (for short) candle.
Break Entry (Optional): If the "Use Break Strategy" option is enabled, the script can also enter positions when the price breaks through Fibonacci levels, providing more aggressive entry opportunities.
Stop Loss Management:
The script offers flexible stop loss settings. Users can choose between a fixed percentage stop loss or an ATR-based stop loss, which adjusts based on market volatility.
The ATR (Average True Range) stop loss is multiplied by a user-defined factor, allowing for tailored risk management based on market conditions.
Trailing Stop Mechanism:
The script includes an optional trailing stop feature, which adjusts the stop loss level as the market moves in favor of the trade. This helps lock in profits while allowing the trade to run if the trend continues.
The trailing stop is calculated as a percentage of the difference between the entry price and the current market price.
Multiple Take Profit Levels:
The strategy calculates seven take profit levels, each at incremental percentages above (for long trades) or below (for short trades) the entry price. This allows for gradual profit-taking as the market moves in the trade's favor.
Each take profit level can be customized in terms of the percentage of the position to be closed, providing precise control over exit strategies.
Strategy Backtesting and Results:
Realistic Backtesting:
The script has been backtested with realistic account sizes, commission rates, and slippage settings to ensure that the results are applicable to actual trading scenarios.
The backtesting covers various timeframes and markets to ensure the strategy's robustness across different trading environments.
Default Settings:
The script is published with default settings that have been optimized for general use. These settings include a 15-minute timeframe, a 1.0% stop loss, a 2.0 ATR multiplier for stop loss, and a 1.5% trailing stop.
Users can adjust these settings to better fit their specific trading style or the market they are trading.
How It Works:
Long Entry Conditions:
The strategy enters a long position when the price touches the 19% Fibonacci level (from high to low) or the reverse 19% level (from low to high) and confirms the move with a bullish candle.
If the "Use Break Strategy" option is enabled, the script will also enter a long position when the price breaks below the 19% Fibonacci level and then moves back up, confirming the break with a bullish candle.
Short Entry Conditions:
The strategy enters a short position when the price touches the 82.56% Fibonacci level and confirms the move with a bearish candle.
If the "Use Break Strategy" option is enabled, the script will also enter a short position when the price breaks above the 82.56% Fibonacci level and then moves back down, confirming the break with a bearish candle.
Stop Loss and Take Profit Logic:
The stop loss for each trade is calculated based on the selected method (fixed percentage or ATR-based). The strategy then manages the trade by either trailing the stop or taking profit at predefined levels.
The take profit levels are set at increments of 0.5% above or below the entry price, depending on whether the position is long or short. The script gradually exits the trade as these levels are hit, securing profits while minimizing risk.
Usage:
For Fibonacci Traders:
This script is ideal for traders who rely on Fibonacci retracement levels to find potential trade entries and exits. The script automates the process, allowing traders to focus on market analysis and decision-making.
For Trend and Swing Traders:
The strategy's flexibility in handling both touch and break entries makes it suitable for trend-following and swing trading strategies. The multiple take profit levels allow traders to capture profits in trending markets while managing risk.
Important Notes:
Originality: This script uniquely combines Fibonacci retracement levels with dynamic stop loss management and multiple take profit levels. It is not just a combination of existing indicators but a thoughtful integration designed to enhance trading performance.
Disclaimer: Trading involves risk, and it is crucial to test this script in a demo account or through backtesting before applying it to live trading. Users should ensure that the settings align with their individual risk tolerance and trading strategy.
Pine-script
LogLibrary "Log"
- Log methods that return input value for code readbility and cleaness.
method str(input)
str
Namespace types: series float, simple float, input float, const float
Parameters:
input (float)
method str(input)
str
Namespace types: series int, simple int, input int, const int
Parameters:
input (int)
method str(input)
str
Namespace types: series bool, simple bool, input bool, const bool
Parameters:
input (bool)
method str(input)
str
Namespace types: series string, simple string, input string, const string
Parameters:
input (string)
method str(input)
str
Namespace types: series linefill
Parameters:
input (linefill)
method str(input)
str
Namespace types: series line
Parameters:
input (line)
method str(input)
str
Namespace types: series box
Parameters:
input (box)
method str(input)
str
Namespace types: series label
Parameters:
input (label)
method str(input)
str
Namespace types: chart.point
Parameters:
input (chart.point)
method str(input)
str
Namespace types: array
Parameters:
input (array)
method str(input)
str
Namespace types: array
Parameters:
input (array)
method str(input)
str
Namespace types: array
Parameters:
input (array)
method str(input)
str
Namespace types: array
Parameters:
input (array)
method str(input)
str
Namespace types: array
Parameters:
input (array)
method str(input)
str
Namespace types: array
Parameters:
input (array)
method str(input)
str
Namespace types: array
Parameters:
input (array)
method str(input)
str
Namespace types: array
Parameters:
input (array)
method str(input)
str
Namespace types: array
Parameters:
input (array)
method str(input)
str
Namespace types: matrix
Parameters:
input (matrix)
method str(input)
str
Namespace types: matrix
Parameters:
input (matrix)
method str(input)
str
Namespace types: matrix
Parameters:
input (matrix)
method str(input)
str
Namespace types: matrix
Parameters:
input (matrix)
method str(input)
str
Namespace types: matrix
Parameters:
input (matrix)
method str(input)
str
Namespace types: matrix
Parameters:
input (matrix)
method str(input)
str
Namespace types: matrix
Parameters:
input (matrix)
method str(input)
str
Namespace types: matrix
Parameters:
input (matrix)
method str(input)
Namespace types: matrix
Parameters:
input (matrix)
method info(input, msg)
Logs the input value with the 'info' log level.
Namespace types: chart.point
Parameters:
input (chart.point) : The input value to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input value.
method info(input, msg)
Logs the input value with the 'info' log level.
Namespace types: series float, simple float, input float, const float
Parameters:
input (float) : The input value to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input value.
method info(input, msg)
Logs the input value with the 'info' log level.
Namespace types: series int, simple int, input int, const int
Parameters:
input (int) : The input value to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input value.
method info(input, msg)
Logs the input value with the 'info' log level.
Namespace types: series bool, simple bool, input bool, const bool
Parameters:
input (bool) : The input value to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input value.
method info(input, msg)
Logs the input value with the 'info' log level.
Namespace types: series string, simple string, input string, const string
Parameters:
input (string) : The input value to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input value.
method info(input, msg)
Logs the input value with the 'info' log level.
Namespace types: series linefill
Parameters:
input (linefill) : The input value to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input value.
method info(input, msg)
Logs the input value with the 'info' log level.
Namespace types: series line
Parameters:
input (line) : The input value to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input value.
method info(input, msg)
Logs the input value with the 'info' log level.
Namespace types: series box
Parameters:
input (box) : The input value to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input value.
method info(input, msg)
Logs the input array with the 'info' log level.
Namespace types: series label
Parameters:
input (label) : The input array to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input array.
method info(input, msg)
Logs the input array with the 'info' log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input array.
method info(input, msg)
Logs the input array with the 'info' log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input array.
method info(input, msg)
Logs the input array with the 'info' log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input array.
method info(input, msg)
Logs the input array with the 'info' log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input array.
method info(input, msg)
Logs the input array with the 'info' log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input array.
method info(input, msg)
Logs the input array with the 'info' log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input array.
method info(input, msg)
Logs the input array with the 'info' log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input array.
method info(input, msg)
Logs the input array with the 'info' log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input array.
method info(input, msg)
Logs the input matrix with the 'info' log level.
Namespace types: array
Parameters:
input (array) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input matrix.
method info(input, msg)
Logs the input matrix with the 'info' log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input matrix.
method info(input, msg)
Logs the input matrix with the 'info' log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input matrix.
method info(input, msg)
Logs the input matrix with the 'info' log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input matrix.
method info(input, msg)
Logs the input matrix with the 'info' log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input matrix.
method info(input, msg)
Logs the input matrix with the 'info' log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input matrix.
method info(input, msg)
Logs the input matrix with the 'info' log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input matrix.
method info(input, msg)
Logs the input matrix with the 'info' log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input matrix.
method info(input, msg)
Logs the input matrix with the 'info' log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input matrix.
method info(input, msg)
Namespace types: matrix
Parameters:
input (matrix)
msg (string)
method warn(input, msg)
Logs the input value with the 'warning' log level.
Namespace types: chart.point
Parameters:
input (chart.point) : The input value to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input value.
method warn(input, msg)
Logs the input value with the 'warning' log level.
Namespace types: series float, simple float, input float, const float
Parameters:
input (float) : The input value to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input value.
method warn(input, msg)
Logs the input value with the 'warning' log level.
Namespace types: series int, simple int, input int, const int
Parameters:
input (int) : The input value to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input value.
method warn(input, msg)
Logs the input value with the 'warning' log level.
Namespace types: series bool, simple bool, input bool, const bool
Parameters:
input (bool) : The input value to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input value.
method warn(input, msg)
Logs the input value with the 'warning' log level.
Namespace types: series string, simple string, input string, const string
Parameters:
input (string) : The input value to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input value.
method warn(input, msg)
Logs the input value with the 'warning' log level.
Namespace types: series linefill
Parameters:
input (linefill) : The input value to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input value.
method warn(input, msg)
Logs the input value with the 'warning' log level.
Namespace types: series line
Parameters:
input (line) : The input value to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input value.
method warn(input, msg)
Logs the input value with the 'warning' log level.
Namespace types: series box
Parameters:
input (box) : The input value to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input value.
method warn(input, msg)
Logs the input array with the 'warning' log level.
Namespace types: series label
Parameters:
input (label) : The input array to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input array.
method warn(input, msg)
Logs the input array with the 'warning' log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input array.
method warn(input, msg)
Logs the input array with the 'warning' log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input array.
method warn(input, msg)
Logs the input array with the 'warning' log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input array.
method warn(input, msg)
Logs the input array with the 'warning' log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input array.
method warn(input, msg)
Logs the input array with the 'warning' log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input array.
method warn(input, msg)
Logs the input array with the 'warning' log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input array.
method warn(input, msg)
Logs the input array with the 'warning' log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input array.
method warn(input, msg)
Logs the input array with the 'warning' log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input array.
method warn(input, msg)
Logs the input matrix with the 'warning' log level.
Namespace types: array
Parameters:
input (array) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input matrix.
method warn(input, msg)
Logs the input matrix with the 'warning' log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input matrix.
method warn(input, msg)
Logs the input matrix with the 'warning' log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input matrix.
method warn(input, msg)
Logs the input matrix with the 'warning' log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input matrix.
method warn(input, msg)
Logs the input matrix with the 'warning' log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input matrix.
method warn(input, msg)
Logs the input matrix with the 'warning' log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input matrix.
method warn(input, msg)
Logs the input matrix with the 'warning' log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input matrix.
method warn(input, msg)
Logs the input matrix with the 'warning' log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input matrix.
method warn(input, msg)
Logs the input matrix with the 'warning' log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input matrix.
method warn(input, msg)
Namespace types: matrix
Parameters:
input (matrix)
msg (string)
method error(input, msg)
Logs the input value with the 'error' log level.
Namespace types: chart.point
Parameters:
input (chart.point) : The input value to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input value.
method error(input, msg)
Logs the input value with the 'error' log level.
Namespace types: series float, simple float, input float, const float
Parameters:
input (float) : The input value to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input value.
method error(input, msg)
Logs the input value with the 'error' log level.
Namespace types: series int, simple int, input int, const int
Parameters:
input (int) : The input value to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input value.
method error(input, msg)
Logs the input value with the 'error' log level.
Namespace types: series bool, simple bool, input bool, const bool
Parameters:
input (bool) : The input value to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input value.
method error(input, msg)
Logs the input value with the 'error' log level.
Namespace types: series string, simple string, input string, const string
Parameters:
input (string) : The input value to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input value.
method error(input, msg)
Logs the input value with the 'error' log level.
Namespace types: series linefill
Parameters:
input (linefill) : The input value to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input value.
method error(input, msg)
Logs the input value with the 'error' log level.
Namespace types: series line
Parameters:
input (line) : The input value to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input value.
method error(input, msg)
Logs the input value with the 'error' log level.
Namespace types: series box
Parameters:
input (box) : The input value to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input value.
method error(input, msg)
Logs the input array with the 'error' log level.
Namespace types: series label
Parameters:
input (label) : The input array to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input array.
method error(input, msg)
Logs the input array with the 'error' log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input array.
method error(input, msg)
Logs the input array with the 'error' log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input array.
method error(input, msg)
Logs the input array with the 'error' log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input array.
method error(input, msg)
Logs the input array with the 'error' log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input array.
method error(input, msg)
Logs the input array with the 'error' log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input array.
method error(input, msg)
Logs the input array with the 'error' log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input array.
method error(input, msg)
Logs the input array with the 'error' log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input array.
method error(input, msg)
Logs the input array with the 'error' log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input array.
method error(input, msg)
Logs the input matrix with the 'error' log level.
Namespace types: array
Parameters:
input (array) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input matrix.
method error(input, msg)
Logs the input matrix with the 'error' log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input matrix.
method error(input, msg)
Logs the input matrix with the 'error' log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input matrix.
method error(input, msg)
Logs the input matrix with the 'error' log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input matrix.
method error(input, msg)
Logs the input matrix with the 'error' log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input matrix.
method error(input, msg)
Logs the input matrix with the 'error' log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input matrix.
method error(input, msg)
Logs the input matrix with the 'error' log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input matrix.
method error(input, msg)
Logs the input matrix with the 'error' log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input matrix.
method error(input, msg)
Logs the input matrix with the 'error' log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
Returns: The input matrix.
method error(input, msg)
Namespace types: matrix
Parameters:
input (matrix)
msg (string)
method log(input, msg, level)
Logs the input value with the specified log level.
Namespace types: chart.point
Parameters:
input (chart.point) : The input value to log.
msg (string) : The message to log. Default is an empty string.
level (int) : The log level (1 - info, 2 - warning, 3 - error). Default is 1.
Returns: The input value.
method log(input, msg, level)
Logs the input value with the specified log level.
Namespace types: series float, simple float, input float, const float
Parameters:
input (float) : The input value to log.
msg (string) : The message to log. Default is an empty string.
level (int) : The log level (1 - info, 2 - warning, 3 - error). Default is 1.
Returns: The input value.
method log(input, msg, level)
Logs the input value with the specified log level.
Namespace types: series int, simple int, input int, const int
Parameters:
input (int) : The input value to log.
msg (string) : The message to log. Default is an empty string.
level (int) : The log level (1 - info, 2 - warning, 3 - error). Default is 1.
Returns: The input value.
method log(input, msg, level)
Logs the input value with the specified log level.
Namespace types: series bool, simple bool, input bool, const bool
Parameters:
input (bool) : The input value to log.
msg (string) : The message to log. Default is an empty string.
level (int) : The log level (1 - info, 2 - warning, 3 - error). Default is 1.
Returns: The input value.
method log(input, msg, level)
Logs the input value with the specified log level.
Namespace types: series string, simple string, input string, const string
Parameters:
input (string) : The input value to log.
msg (string) : The message to log. Default is an empty string.
level (int) : The log level (1 - info, 2 - warning, 3 - error). Default is 1.
Returns: The input value.
method log(input, msg, level)
Logs the input value with the specified log level.
Namespace types: series linefill
Parameters:
input (linefill) : The input value to log.
msg (string) : The message to log. Default is an empty string.
level (int) : The log level (1 - info, 2 - warning, 3 - error). Default is 1.
Returns: The input value.
method log(input, msg, level)
Logs the input value with the specified log level.
Namespace types: series line
Parameters:
input (line) : The input value to log.
msg (string) : The message to log. Default is an empty string.
level (int) : The log level (1 - info, 2 - warning, 3 - error). Default is 1.
Returns: The input value.
method log(input, msg, level)
Logs the input value with the specified log level.
Namespace types: series box
Parameters:
input (box) : The input value to log.
msg (string) : The message to log. Default is an empty string.
level (int) : The log level (1 - info, 2 - warning, 3 - error). Default is 1.
Returns: The input value.
method log(input, msg, level)
Logs the input array with the specified log level.
Namespace types: series label
Parameters:
input (label) : The input array to log.
msg (string) : The message to log. Default is an empty string.
level (int) : The log level (1 - info, 2 - warning, 3 - error). Default is 1.
Returns: The input array.
method log(input, msg, level)
Logs the input array with the specified log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
level (int) : The log level (1 - info, 2 - warning, 3 - error). Default is 1.
Returns: The input array.
method log(input, msg, level)
Logs the input array with the specified log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
level (int) : The log level (1 - info, 2 - warning, 3 - error). Default is 1.
Returns: The input array.
method log(input, msg, level)
Logs the input array with the specified log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
level (int) : The log level (1 - info, 2 - warning, 3 - error). Default is 1.
Returns: The input array.
method log(input, msg, level)
Logs the input array with the specified log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
level (int) : The log level (1 - info, 2 - warning, 3 - error). Default is 1.
Returns: The input array.
method log(input, msg, level)
Logs the input array with the specified log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
level (int) : The log level (1 - info, 2 - warning, 3 - error). Default is 1.
Returns: The input array.
method log(input, msg, level)
Logs the input array with the specified log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
level (int) : The log level (1 - info, 2 - warning, 3 - error). Default is 1.
Returns: The input array.
method log(input, msg, level)
Logs the input array with the specified log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
level (int) : The log level (1 - info, 2 - warning, 3 - error). Default is 1.
Returns: The input array.
method log(input, msg, level)
Logs the input array with the specified log level.
Namespace types: array
Parameters:
input (array) : The input array to log.
msg (string) : The message to log. Default is an empty string.
level (int) : The log level (1 - info, 2 - warning, 3 - error). Default is 1.
Returns: The input array.
method log(input, msg, level)
Logs the input matrix with the specified log level.
Namespace types: array
Parameters:
input (array) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
level (int) : The log level (1 - info, 2 - warning, 3 - error). Default is 1.
Returns: The input matrix.
method log(input, msg, level)
Logs the input matrix with the specified log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
level (int) : The log level (1 - info, 2 - warning, 3 - error). Default is 1.
Returns: The input matrix.
method log(input, msg, level)
Logs the input matrix with the specified log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
level (int) : The log level (1 - info, 2 - warning, 3 - error). Default is 1.
Returns: The input matrix.
method log(input, msg, level)
Logs the input matrix with the specified log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
level (int) : The log level (1 - info, 2 - warning, 3 - error). Default is 1.
Returns: The input matrix.
method log(input, msg, level)
Logs the input matrix with the specified log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
level (int) : The log level (1 - info, 2 - warning, 3 - error). Default is 1.
Returns: The input matrix.
method log(input, msg, level)
Logs the input matrix with the specified log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
level (int) : The log level (1 - info, 2 - warning, 3 - error). Default is 1.
Returns: The input matrix.
method log(input, msg, level)
Logs the input matrix with the specified log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
level (int) : The log level (1 - info, 2 - warning, 3 - error). Default is 1.
Returns: The input matrix.
method log(input, msg, level)
Logs the input matrix with the specified log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
level (int) : The log level (1 - info, 2 - warning, 3 - error). Default is 1.
Returns: The input matrix.
method log(input, msg, level)
Logs the input matrix with the specified log level.
Namespace types: matrix
Parameters:
input (matrix) : The input matrix to log.
msg (string) : The message to log. Default is an empty string.
level (int) : The log level (1 - info, 2 - warning, 3 - error). Default is 1.
Returns: The input matrix.
method log(input, msg, level)
Namespace types: matrix
Parameters:
input (matrix)
msg (string)
level (int)
ST_greed_spot_exampleA simple grid long strategy. The first entry into the transaction is carried out according to the "double bottom" pattern, then when the average entry price decreases by a certain percentage, the position is completed. Dobor is always carried out for the same amount of funds. Take profit with an increase in the average entry price for a given volume