From 40968f95add334fa6939028bdf75fb4debde710c Mon Sep 17 00:00:00 2001 From: Dobromir Popov Date: Fri, 12 Jan 2024 15:30:39 +0200 Subject: [PATCH] new script - scafold --- Niki/new.pinescript | 52 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Niki/new.pinescript diff --git a/Niki/new.pinescript b/Niki/new.pinescript new file mode 100644 index 0000000..7e7ea4c --- /dev/null +++ b/Niki/new.pinescript @@ -0,0 +1,52 @@ +//@version=4 +study("DrNiki Nuke", shorttitle="DrNiki Nuke", overlay=true) + +// Define pairs and timeframes +string[] pairs = ["US30", "GOLD", "DXY", "BTCUSDT.P", syminfo.ticker] +int[] timeframes = [60, 120, 180, 240] // Timeframes in minutes + +// Initialize variables for odds and points +var float[] longOdds = array.new_float(0) +var float[] shortOdds = array.new_float(0) + + +wavetrendPoints(pair, timeframe) => + wt1 = ... // Your calculation for wavetrend wt1 here + wt1[0] > wt1[1] ? 1 : wt1[0] < wt1[1] ? -1 : 0 + +rsiPoints(pair, timeframe) => + rsiValue = rsi(close, 14) // Example: using 14 periods for RSI + rsiValue[0] > rsiValue[1] ? 1 : rsiValue[0] < rsiValue[1] ? -1 : 0 + +stochRsiKPoints(pair, timeframe) => + K = stoch(close, high, low, 14) // Example: using 14 periods for Stoch RSI + K[0] > K[1] ? 1 : K[0] < K[1] ? -1 : 0 + +obvPoints(pair, timeframe) => + obvValue = obv(close, volume) + obvValue[0] > obvValue[1] ? 1 : obvValue[0] < obvValue[1] ? -1 : 0 + + +// Function to calculate points for indicators +calcPoints(indicator, current, previous) => + + +// Main Calculation Loop +for pair in pairs + for timeframe in timeframes + // Switch to pair and timeframe + ... + // Calculate points for each indicator + longPoints = calcPoints(wt1, ...) + calcPoints(rsi, ...) + ... + shortPoints = calcPoints(wt1, ...) + calcPoints(rsi, ...) + ... + // Inverse for DXY + if pair == "DXY" + ... + // Normalize to get odds + longOdds = ... + shortOdds = ... + // Display results + ... + +// Combine and display most efficient combinations +...