niki's changes

This commit is contained in:
Dobromir Popov 2024-01-12 15:24:16 +02:00
parent 5b700c45ad
commit dc411abbf5

View File

@ -1,5 +1,5 @@
//@version=5
indicator("drniki nuke", shorttitle="DN", overlay=true)
indicator("DrNiki's Market Nuker", shorttitle="DrNiki's Market Nuker", overlay=true)
// Relative Strength Index (RSI)
rsiLength = input(14, title="RSI Length")
@ -58,7 +58,7 @@ shortPointsStochRSIUS30 = stochRsiValue < stochRsiValue[1] ? 1 : 0
longPointsWavetrendUS30 = wt1 > wt1[1] ? 1 : 0
shortPointsWavetrendUS30 = wt1 < wt1[1] ? 1 : 0
// Initialize points for the current trading pair (PAIR)
// Initialize points for the current trading pair (syminfo.ticker)
longPointsRSIPAIR = close > close[1] ? 1 : 0
shortPointsRSIPAIR = close < close[1] ? 1 : 0
longPointsStochRSIPAIR = stochRsiValue > stochRsiValue[1] ? 1 : 0
@ -110,8 +110,6 @@ combinedProbabilityShort = totalShortPoints / 15 * 100
// Display combined probabilities in a box at the top right corner
var labelBox = label.new(na, na, "")
label.set_xy(labelBox, bar_index, high)
label.set_text(labelBox, "Long: BTC " + str.tostring(combinedProbabilityLongBTC) + "%, DXY " + str.tostring(combinedProbabilityLongDXY) + "%, GOLD " + str.tostring(combinedProbabilityLongGOLD) + "%, US30 " + str.tostring(combinedProbabilityLongUS30) + "%, PAIR " + str.tostring(combinedProbabilityLongPAIR) + "%\nShort: BTC " + str.tostring(combinedProbabilityShortBTC) + "%, DXY " + str.tostring(combinedProbabilityShortDXY) + "%, GOLD " + str.tostring(combinedProbabilityShortGOLD) + "%, US30 " + str.tostring(combinedProbabilityShortUS30) + "%, PAIR " + str.tostring(combinedProbabilityShortPAIR) + "%\n\nTotal: Long " + str.tostring(combinedProbabilityLong) + "%, Short " + str.tostring(combinedProbabilityShort) + "%")
label.set_text(labelBox, "Long: BTC " + str.tostring(combinedProbabilityLongBTC) + "%, DXY " + str.tostring(combinedProbabilityLongDXY) + "%, GOLD " + str.tostring(combinedProbabilityLongGOLD) + "%, US30 " + str.tostring(combinedProbabilityLongUS30) + "%, syminfo.ticker " + str.tostring(combinedProbabilityLongPAIR) + "%\nShort: BTC " + str.tostring(combinedProbabilityShortBTC) + "%, DXY " + str.tostring(combinedProbabilityShortDXY) + "%, GOLD " + str.tostring(combinedProbabilityShortGOLD) + "%, US30 " + str.tostring(combinedProbabilityShortUS30) + "%, syminfo.ticker " + str.tostring(combinedProbabilityShortPAIR) + "%\n\nTotal: Long " + str.tostring(combinedProbabilityLong) + "%, Short " + str.tostring(combinedProbabilityShort) + "%")
label.set_color(labelBox, color.new(color.blue, 0))
label.set_style(labelBox, label.style_label_left)