new script - scafold
This commit is contained in:
parent
dc411abbf5
commit
40968f95ad
52
Niki/new.pinescript
Normal file
52
Niki/new.pinescript
Normal file
@ -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
|
||||
...
|
Loading…
x
Reference in New Issue
Block a user