// Gaussian Weighted Moving Average Function f_gaussian(source, length) => half = (length - 1) / 2.0 sum = 0.0 norm = 0.0 // Gaussian standard deviation chosen as length/6 for a smooth curve denom = (length / 6.0) * (length / 6.0) for i = 0 to length - 1 x = i - half w = math.exp(-(x * x) / (2 * denom)) sum += source * w norm += w sum / norm
// Gaussian Weighted Standard Deviation Function f_gaussian_std(source, length) => half = (length - 1) / 2.0 gavg = f_gaussian(source, length) sum = 0.0 norm = 0.0 denom = (length / 6.0) * (length / 6.0) for i = 0 to length - 1 x = i - half w = math.exp(-(x * x)/(2*denom)) diff = source - gavg sum += diff * diff * w norm += w math.sqrt(sum/norm)
// Conditions // Long entry: Price closes above upper Gaussian line AND Stoch RSI K > D (stochastic is "up") longCondition = close > gaussUpper and k > d
// Exit condition: Price closes below upper Gaussian line exitCondition = close < gaussUpper
// Only trade in the specified date range inDateRange = time >= timestamp("2018-01-01T00:00:00") and time < timestamp("2069-01-01T00:00:00")
// Submit Orders if inDateRange if longCondition and strategy.position_size <= 0 strategy.entry("Long", strategy.long) if exitCondition and strategy.position_size > 0 strategy.close("Long")
Trade Entry: 106,749 Stop Loss: 105,500 Take Profit 1: 107,500 Take Profit 2: 108,200
Reason for Entry: The price is near a strong daily support level and has bounced off the 61.8% Fibonacci retracement level, indicating a potential upward reversal.
Trade Idea 2: Sell Setup
Trade Entry: 1.04154 Stop Loss: 1.04500 Take Profit 1: 1.03800 Take Profit 2: 1.03500
Reason for Entry: The price is approaching a strong daily resistance level and is near the 78.6% Fibonacci retracement level, suggesting a potential downward correction.
These setups are based on daily Fibonacci retracement levels and strong support resistance zones for high accuracy. Always manage risk