0% found this document useful (0 votes)
14 views2 pages

Trading Strategy: Copy Bilionario Indicator

Uploaded by

leooguerreiro1
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views2 pages

Trading Strategy: Copy Bilionario Indicator

Uploaded by

leooguerreiro1
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

instrument {

name = 'COPY BILIONARIO',


short_name = 'super',

overlay = true
}

MaFast_period = input(1,"Ma Fast period",[Link],1,1000,1)


MaValue = input(5,"Ma Value", input.string_selection,[Link])

MaSlow_period = input(34,"Ma Slow period",[Link],1,1000,1)

Signal_period = input(5,"Signal period",[Link],1,1000,1)

input_group {
"Compra",
colorBuy = input { default = "green", type = [Link] },
visibleBuy = input { default = true, type = input.plot_visibility }
}

input_group {
"Venda",
colorSell = input { default = "red", type = [Link] },
visibleSell = input { default = true, type = input.plot_visibility }
}

local titleValue = inputs[MaValue]

-- mdia mvel linear rpida


smaFast = sma(titleValue, MaFast_period)

-- mdia mvel linear devagar


smaSlow = sma(titleValue, MaSlow_period)

-- calculo diferencial - serie


buffer1 = smaFast - smaSlow

-- clculo da mdia mvel ponderada - serie


buffer2 = wma(buffer1, Signal_period)

buyCondition = conditional(buffer1 > buffer2 and buffer1[1] < buffer2[1] and not
(buffer1 < buffer2 and buffer1[1] > buffer2[1]))
buyCondition = conditional(buffer1 > buffer2 and buffer1[1] < buffer2[1])

sellCondition = conditional(buffer1 < buffer2 and buffer1[1] > buffer2[1] and not
(buffer1 > buffer2 and buffer1[1] < buffer2[1]))
sellCondition = conditional(buffer1 < buffer2 and buffer1[1] > buffer2[1] )
plot_shape(
(buyCondition),
"CALL",
shape_style.triangleup,
shape_size.huge,
colorBuy,
shape_location.belowbar,
-1,
"CALL",
"green"
)

plot_shape(
(sellCondition),
"PUT",
shape_style.triangledown,
shape_size.huge,
colorSell,
shape_location.abovebar,
-1,
"PUT",
"red"
)

Common questions

Powered by AI

The conditional expressions are critical as they formalize the logic for triggering buy and sell signals based on moving average crossovers. For buy conditions, the expression ensures that a signal is triggered only when 'buffer1' crosses above 'buffer2', indicating a potential upward trend. Similarly, the sell condition takes into account when 'buffer1' crosses below 'buffer2', suggesting a downward trend. These conditions prevent false signals by ensuring that only meaningful crossovers generate trading signals .

The plot functions in 'COPY BILIONARIO' might fail to effectively communicate signals in scenarios of overlapping signal points or in highly volatile markets where signals change rapidly. The chosen shapes and colors might not stand out on charts with numerous indicators or noise, leading to confusion. Additionally, in fast markets, the script might not plot signals in sync with price movements if there is significant lag in data processing or rendering, potentially misguiding traders .

The 'COPY BILIONARIO' script allows users to customize the periods of the moving averages through inputs. Users can set the fast moving average period ('MaFast_period'), the slow moving average period ('MaSlow_period'), and the signal period ('Signal_period'). Additionally, users can choose colors for buy ('colorBuy') and sell ('colorSell') indications .

Using simple moving averages (SMA) in the 'COPY BILIONARIO' strategy offers the advantage of smoothing out price data, reducing noise, and highlighting trends. SMAs are straightforward and provide clear crossover signals, which can be useful for traders in identifying potential entry and exit points. However, a major limitation is that SMAs are lagging indicators, causing delayed signals in fast-moving markets. They may also fail in volatile or sideways markets, leading to false signals if there are frequent crossovers without sustained trends .

Traders might adjust the visibility of buy and sell signals to declutter their analysis environment or focus on specific market conditions. For example, in a bullish market, a trader might hide sell signals to concentrate on optimizing entry points for buying. Adjusting visibility can help traders prevent information overload, but it may also lead to missing important trend reversals if the hidden signals would have indicated changes in market direction .

In the 'COPY BILIONARIO' script, the weighted moving average (WMA) is used to smooth the differential series between the fast and slow simple moving averages ('buffer1'). This smoothing helps in determining the crossover points that trigger buy or sell signals by calculating 'buffer2', which is the WMA of 'buffer1', over the defined signal period .

In the 'COPY BILIONARIO' strategy, a sell condition is calculated by assessing the relationship between 'buffer1' and 'buffer2'. A sell signal is indicated when 'buffer1' is less than 'buffer2', and importantly, in the previous period, 'buffer1' was greater than 'buffer2'. This pattern reflects that 'buffer1' has crossed below 'buffer2', signaling a potential downward trend .

The performance of the 'COPY BILIONARIO' strategy is highly sensitive to the input parameters for moving averages. Shorter periods for the fast moving average can make the strategy more responsive to price changes, potentially increasing the number of signals in volatile markets. Conversely, longer periods may reduce noise and focus on long-term trends, but at the cost of less timely signals. The balance between fast and slow periods is crucial to optimize signal accuracy and must align with market conditions and trader preferences. Incorrect settings can lead to missed opportunities or excessive false signals .

The 'COPY BILIONARIO' script determines a buy signal by comparing the fast and slow moving averages calculated over specified periods. A buy condition is triggered when the difference between the fast and slow moving averages ('buffer1') exceeds the weighted moving average of that difference ('buffer2'), and in the previous period, 'buffer1' was less than 'buffer2'. This ensures that a buy signal is generated as 'buffer1' crosses above 'buffer2' .

The script uses `plot_shape` function to ensure visual representation of buy and sell signals. It plots upward-pointing triangles below the bars for buy signals and downward-pointing triangles above the bars for sell signals. The color and shape are determined by conditions met for buy ('CALL') or sell ('PUT'), with default colors being green and red respectively .

You might also like