-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpinescript-strategies.html
More file actions
583 lines (515 loc) · 36.7 KB
/
pinescript-strategies.html
File metadata and controls
583 lines (515 loc) · 36.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="alternate" type="application/atom+xml" title="RSS Feed" href="/feed.xml" />
<link rel="stylesheet" href="./styles/blog-common.css" />
<link rel="stylesheet" href="./styles/side-income.css" />
<style>
.fullscreen {
padding: 10px 50px;
max-width: 70%;
margin: auto;
text-align: justify;
}
.tip {
background: #e8f4fc;
padding: 15px;
border-left: 4px solid #3498db;
margin: 20px 0;
}
.code-comment {
color: #6a9955;
font-style: italic;
}
svg {
width: 80%;
height: 150px;
display: block;
margin: auto;
}
.wick {
stroke-width: 1;
stroke: #ccc;
stroke-linecap: round;
}
.candle {
transform-origin: bottom;
animation: growCandle 0.6s ease-out;
}
@keyframes growCandle {
from {
transform: scaleY(0);
}
to {
transform: scaleY(1);
}
}
header.blog-header {
background: none !important;
}
h1.blog-title, .blog-subtitle {
color: inherit;
}
</style>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-0MM8039GLD"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-0MM8039GLD');
</script>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap" rel="stylesheet"/>
<!--<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9243803325136617" crossorigin="anonymous"></script>-->
<!-- Enhanced Meta Tags -->
<title>75+ Profitable Pine Script Strategies - Starting @$14/week</title>
<meta name="description" content="Ultimate collection of 75+ profitable Pine Script strategies for TradingView. Learn algorithmic trading with our free code examples for SMA, EMA, MACD, RSI, Bollinger Bands and more indicators.">
<meta name="keywords" content="pine script strategies, pinescript strategies, profitable pine script strategies, tradingview strategies, algorithmic trading, pine script tutorial, trading indicators, sma strategy, ema strategy, macd strategy, rsi strategy, bollinger bands strategy">
<meta name="robots" content="index, follow">
<!-- Open Graph / Social Meta -->
<meta property="og:title" content="75+ Profitable Pine Script Strategies - Starting @$14/week">
<meta property="og:description" content="Ultimate collection of 75+ profitable Pine Script strategies for TradingView with free code examples.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://offline-pixel.github.io/pinescript-strategies.html">
<meta property="og:image" content="https://offline-pixel.github.io/assets/logo2.png">
<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="75+ Profitable Pine Script Strategies">
<meta name="twitter:description" content="Ultimate collection of profitable Pine Script strategies for TradingView with free code examples.">
<meta name="twitter:image" content="https://offline-pixel.github.io/assets/logo2.png">
<!-- Canonical Link -->
<link rel="canonical" href="https://offline-pixel.github.io/pinescript-strategies.html">
<!-- JSON-LD Schema Markup -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebPage",
"name": "75+ Profitable Pine Script Strategies",
"description": "Ultimate collection of profitable Pine Script strategies for TradingView with free code examples.",
"url": "https://offline-pixel.github.io/pinescript-strategies.html",
"breadcrumb": {
"@type": "BreadcrumbList",
"itemListElement": [{
"@type": "ListItem",
"position": 1,
"name": "Home",
"item": "https://offline-pixel.github.io/"
},{
"@type": "ListItem",
"position": 2,
"name": "Pine Script Strategies"
}]
},
"mainEntity": {
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "What are Pine Script strategies?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Pine Script strategies are automated trading algorithms written in TradingView's Pine Script language that can backtest and execute trades based on technical indicators and price patterns."
}
},
{
"@type": "Question",
"name": "Are these Pine Script strategies profitable?",
"acceptedAnswer": {
"@type": "Answer",
"text": "While all strategies shown have profit potential, actual results depend on market conditions, proper parameter optimization, and risk management. We provide the code for you to test and adapt."
}
},
{
"@type": "Question",
"name": "How do I use these Pine Script strategies?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Simply copy the code from any strategy page, paste into TradingView's Pine Editor, and apply to your chart. You can then backtest and adjust parameters as needed."
}
},
{
"@type": "Question",
"name": "What's the difference between beginner and advanced strategies?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Beginner strategies use basic indicators like SMA/EMA, while advanced strategies combine multiple indicators, volume analysis, and complex pattern recognition for more sophisticated signals."
}
}
]
}
}
</script>
</head>
<body>
<header class="blog-header">
<div class="container">
<h1 class="blog-title">Pinescript Strategies & Indicators</h1>
<p class="blog-subtitle">Dive deep into TradingView's Pinescript with our comprehensive tutorials on essential indicators and advanced pinescript trading strategies</p>
<p class="blog-subtitle"><small>⭐⭐⭐ 500+ Clients Helped | 💯 100% Satisfaction Rate</small></p>
<div style="text-align: center; margin-top:15px">
<a href="https://offlinepixel.gumroad.com/l/trader-on-the-go" target="_blank" rel="noopener noreferrer">
<img src="../assets/ss.png" width="100%" />
</a>
<a href="https://offlinepixel.gumroad.com/l/trader-on-the-go" class="new-link" target="_blank" rel="noopener noreferrer">
Get Pine Script Strategy
</a></div>
</div>
</header>
<main class="container">
<nav class="breadcrumb" aria-label="Breadcrumb">
<a href="https://offline-pixel.github.io/">Home</a> >
<span aria-current="page">Pine Script Strategies</span>
</nav>
<div class="container-child">
<section class="intro">
<h2>Pine Script Strategies</h2>
<p>This is the most comprehensive collection of ready-to-use Pine Script strategies available online. Whether you're learning algorithmic trading or looking to enhance your existing TradingView scripts, you'll find practical code examples for:</p>
<ul style="list-style: none;">
<li><strong><small>Trend-following strategies</small></strong> <small>( Moving Averages, MACD, SuperTrend)</small></li>
<li><strong><small>Mean-reversion systems</small></strong> <small>( Bollinger Bands, RSI, Stochastic)</small></li>
<li><strong><small>Volume-based approaches</small></strong> <small>( OBV, VWAP, Accumulation/Distribution)</small></li>
<li><strong><small>Advanced pattern recognition</small></strong> <small>( Candlestick patterns, Fibonacci, Gann)</small></li>
</ul>
</section>
<div>
<div class="stats-container">
<div class="stat-card">
<div class="stat-value">75+</div>
<div class="stat-label">Pinescript strategies</div>
</div>
<div class="stat-card">
<div class="stat-value">All</div>
<div class="stat-label">Skill Levels Covered</div>
</div>
<div class="stat-card">
<div class="stat-value">Practical</div>
<div class="stat-label">Code Examples</div>
</div>
</div>
<div class="filter-container">
<button class="filter-btn active" data-filter="all">All Guides</button>
<button class="filter-btn" data-filter="Beginner">Beginner</button>
<button class="filter-btn" data-filter="Intermediate">Intermediate</button>
<button class="filter-btn" data-filter="Advanced">Advanced</button>
</div>
<svg id="chart" viewBox="0 0 600 180" preserveAspectRatio="none"></svg>
<script>
const svg = document.getElementById("chart");
const maxCandles = 100;
const candleWidth = 6;
const gap = 2;
const chartHeight = 180;
const maxPrice = 200;
const minPrice = 80;
const candleData = [];
function getRandomCandle(prevClose) {
const open = prevClose ?? random(minPrice, maxPrice);
const close = random(open - 15, open + 15);
const high = Math.max(open, close) + random(1, 10);
const low = Math.min(open, close) - random(1, 10);
return { open, close, high, low };
}
function random(min, max) {
return Math.round(Math.random() * (max - min) + min);
}
function renderCandles() {
svg.innerHTML = "";
const totalWidth = (candleWidth + gap) * maxCandles;
svg.setAttribute("viewBox", `0 0 ${totalWidth} ${chartHeight}`);
candleData.forEach((candle, i) => {
const x = i * (candleWidth + gap);
const scale = chartHeight / (maxPrice - minPrice);
const color = candle.close > candle.open ? "#4ade80" : "#ef4444";
const bodyHeight = Math.abs(candle.close - candle.open) * scale;
const bodyY = chartHeight - Math.max(candle.open, candle.close) * scale;
const wickHigh = chartHeight - candle.high * scale;
const wickLow = chartHeight - candle.low * scale;
const wick = document.createElementNS("http://www.w3.org/2000/svg", "line");
wick.setAttribute("x1", x + candleWidth / 2);
wick.setAttribute("x2", x + candleWidth / 2);
wick.setAttribute("y1", wickHigh);
wick.setAttribute("y2", wickLow);
wick.setAttribute("class", "wick");
svg.appendChild(wick);
const rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
rect.setAttribute("x", x);
rect.setAttribute("y", bodyY);
rect.setAttribute("width", candleWidth);
rect.setAttribute("height", bodyHeight);
rect.setAttribute("fill", color);
rect.setAttribute("class", "candle");
svg.appendChild(rect);
});
}
function addNewCandle() {
const lastClose = candleData[candleData.length - 1]?.close ?? undefined;
const newCandle = getRandomCandle(lastClose);
if (candleData.length >= maxCandles) {
candleData.shift();
}
candleData.push(newCandle);
renderCandles();
}
// Seed initial candles
for (let i = 0; i < maxCandles; i++) addNewCandle();
// Add new candle every 60 seconds
setInterval(() => {
addNewCandle();
}, 5000);
</script>
</div>
</div>
<div class="cards-grid" id="mainCardsGridContainer">
<!-- Blog cards will be dynamically loaded here by JavaScript -->
</div>
<section class="faq-section" style="max-width: 80%; text-align: justify; margin: auto;">
<h2>Pine Script Strategies FAQ</h2>
<div class="tip">
<strong>Pro Tip:</strong> Combine multiple strategies for better results. For example, use a moving average for trend direction and RSI for entry timing.
</div>
<div class="faq-item">
<div class="faq-question"><strong>What are Pine Script strategies?</strong></div>
<div class="faq-answer"><a href="https://offline-pixel.github.io/pinescript-strategies.html" target="_blank">Pine Script strategies</a> are automated trading algorithms written in TradingView's Pine Script language that can backtest and execute trades based on technical indicators and price patterns.</div>
</div>
<div class="faq-item">
<div class="faq-question"><strong>Are these Pine Script strategies profitable?</strong></div>
<div class="faq-answer">While all strategies shown have profit potential, actual results depend on market conditions, proper parameter optimization, and risk management. We provide the code for you to test and adapt.</div>
</div>
<div class="faq-item">
<div class="faq-question"><strong>How do I use these Pine Script strategies?</strong></div>
<div class="faq-answer">Simply copy the code from any strategy page, paste into TradingView's Pine Editor, and apply to your chart. You can then backtest and adjust parameters as needed.</div>
</div>
<div class="faq-item">
<div class="faq-question"><strong>What's the difference between beginner and advanced strategies?</strong></div>
<div class="faq-answer">Beginner strategies use basic indicators like SMA/EMA, while advanced strategies combine multiple indicators, volume analysis, and complex pattern recognition for more sophisticated signals.</div>
</div>
</section>
<section class="cta-section custom-strategy-cta">
<h2 class="cta-title">Enhance Your Trading</h2>
<p>Get a high-performance Pine Script analysis tool for actionable market insights, designed for traders on the move.</p>
<p>This strategy runs in live mode on TradingView, helping you identify potential opportunities.</p>
<p><small>⭐⭐⭐ 500+ Clients Helped | 💯 100% Satisfaction Rate</small></p>
<a href="https://offlinepixel.gumroad.com/l/trader-on-the-go" target="_blank" rel="noopener noreferrer">
<img src="../assets/ss.png" width="100%" />
</a>
<a href="https://offlinepixel.gumroad.com/l/trader-on-the-go" class="new-link" target="_blank" rel="noopener noreferrer">
Get Pine Script Strategy
</a>
</section>
</main>
<script src="./scripts/chat-buttons.js"></script>
<script>
injectChatButtons('#bottom-chat-buttons', {
margins: '20px 0 0 0',
position: 'prepend'
});
</script>
<script>
// Blog titles data for Pine Script articles
const blogTitles = [
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>SMA (Simple Moving Average)</b>", "link": "pinescript-strategies/pine-script-SMA.html", "level": "beginner" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>EMA (Exponential Moving Average)</b>", "link": "pinescript-strategies/pine-script-EMA.html", "level": "beginner" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>MACD (Moving Average Convergence Divergence)</b>", "link": "pinescript-strategies/pine-script-MACD.html", "level": "beginner" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>SuperTrend (ATR-based)</b>", "link": "pinescript-strategies/pine-script-SuperTrend.html", "level": "beginner" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Parabolic SAR</b>", "link": "pinescript-strategies/pine-script-ParabolicSAR.html", "level": "beginner" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Ichimoku Cloud</b>", "link": "pinescript-strategies/pine-script-IchimokuCloud.html", "level": "beginner" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Vortex Indicator</b>", "link": "pinescript-strategies/pine-script-VortexIndicator.html", "level": "beginner" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Trix (Triple Exponential Average)</b>", "link": "pinescript-strategies/pine-script-Trix.html", "level": "beginner" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>KAMA (Kaufman’s Adaptive MA)</b>", "link": "pinescript-strategies/pine-script-KAMA.html", "level": "beginner" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Hull Moving Average (HMA)</b>", "link": "pinescript-strategies/pine-script-HMA.html", "level": "beginner" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Double EMA (DEMA)</b>", "link": "pinescript-strategies/pine-script-DEMA.html", "level": "beginner" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Triple EMA (TEMA)</b>", "link": "pinescript-strategies/pine-script-TEMA.html", "level": "beginner" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Zero Lag EMA (ZLEMA)</b>", "link": "pinescript-strategies/pine-script-ZLEMA.html", "level": "beginner" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>VWMA (Volume Weighted MA)</b>", "link": "pinescript-strategies/pine-script-VWMA.html", "level": "beginner" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Tillson T3</b>", "link": "pinescript-strategies/pine-script-TillsonT3.html", "level": "beginner" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>RSI (Relative Strength Index)</b>", "link": "pinescript-strategies/pine-script-RSI.html", "level": "beginner" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Stochastic %K and %D</b>", "link": "pinescript-strategies/pine-script-Stochastic.html", "level": "beginner" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>CCI (Commodity Channel Index)</b>", "link": "pinescript-strategies/pine-script-CCI.html", "level": "beginner" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Williams %R</b>", "link": "pinescript-strategies/pine-script-WilliamsR.html", "level": "Intermediate" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Ultimate Oscillator</b>", "link": "pinescript-strategies/pine-script-UltimateOscillator.html", "level": "Intermediate" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Chande Momentum Oscillator (CMO)</b>", "link": "pinescript-strategies/pine-script-CMO.html", "level": "Intermediate" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Money Flow Index (MFI)</b>", "link": "pinescript-strategies/pine-script-MFI.html", "level": "Intermediate" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Force Index</b>", "link": "pinescript-strategies/pine-script-ForceIndex.html", "level": "Intermediate" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>ROC (Rate of Change)</b>", "link": "pinescript-strategies/pine-script-ROC.html", "level": "Intermediate" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Awesome Oscillator</b>", "link": "pinescript-strategies/pine-script-AwesomeOscillator.html", "level": "Intermediate" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Know Sure Thing (KST)</b>", "link": "pinescript-strategies/pine-script-KST.html", "level": "Intermediate" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Coppock Curve</b>", "link": "pinescript-strategies/pine-script-CoppockCurve.html", "level": "Intermediate" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Elder-Ray Index</b>", "link": "pinescript-strategies/pine-script-ElderRayIndex.html", "level": "Intermediate" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Detrended Price Oscillator (DPO)</b>", "link": "pinescript-strategies/pine-script-DPO.html", "level": "Intermediate" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Mass Index</b>", "link": "pinescript-strategies/pine-script-MassIndex.html", "level": "Intermediate" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Relative Vigor Index (RVI)</b>", "link": "pinescript-strategies/pine-script-RVI.html", "level": "Intermediate" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Gopalakrishnan Range Index (GAPO)</b>", "link": "pinescript-strategies/pine-script-GAPO.html", "level": "Intermediate" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Choppiness Index</b>", "link": "pinescript-strategies/pine-script-ChoppinessIndex.html", "level": "Intermediate" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Qstick</b>", "link": "pinescript-strategies/pine-script-Qstick.html", "level": "Intermediate" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Average True Range (ATR)</b>", "link": "pinescript-strategies/pine-script-ATR.html", "level": "Intermediate" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Bollinger Bands</b>", "link": "pinescript-strategies/pine-script-BollingerBands.html", "level": "Intermediate" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Keltner Channels</b>", "link": "pinescript-strategies/pine-script-KeltnerChannels.html", "level": "Intermediate" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Donchian Channels</b>", "link": "pinescript-strategies/pine-script-DonchianChannels.html", "level": "Intermediate" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Chaikin Volatility</b>", "link": "pinescript-strategies/pine-script-ChaikinVolatility.html", "level": "Intermediate" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Historical Volatility</b>", "link": "pinescript-strategies/pine-script-HistoricalVolatility.html", "level": "Intermediate" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Ulcer Index</b>", "link": "pinescript-strategies/pine-script-UlcerIndex.html", "level": "Intermediate" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Relative Volatility Index</b>", "link": "pinescript-strategies/pine-script-RelativeVolatilityIndex.html", "level": "Intermediate" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Annualized Volatility</b>", "link": "pinescript-strategies/pine-script-AnnualizedVolatility.html", "level": "Intermediate" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Fractal Chaos Bands</b>", "link": "pinescript-strategies/pine-script-FractalChaosBands.html", "level": "Intermediate" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Obv</b>", "link": "pinescript-strategies/pine-script-OBV.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Vwap Daily</b>", "link": "pinescript-strategies/pine-script-VWAP-Daily.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Accumulation distribution line</b>", "link": "pinescript-strategies/pine-script-AccumulationDistributionLine.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Chaikin money flow</b>", "link": "pinescript-strategies/pine-script-ChaikinMoneyFlow.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Ease of movement</b>", "link": "pinescript-strategies/pine-script-EaseOfMovement.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Volume roc</b>", "link": "pinescript-strategies/pine-script-VolumeROC.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Volume price trend</b>", "link": "pinescript-strategies/pine-script-VolumePriceTrend.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Negative volume index</b>", "link": "pinescript-strategies/pine-script-NegativeVolumeIndex.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Positive volume index</b>", "link": "pinescript-strategies/pine-script-PositiveVolumeIndex.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Demand index</b>", "link": "pinescript-strategies/pine-script-DemandIndex.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Herrick payoff index</b>", "link": "pinescript-strategies/pine-script-HerrickPayoffIndex.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Volume weighted macd</b>", "link": "pinescript-strategies/pine-script-VolumeWeightedMACD.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Volume adjusted rsi</b>", "link": "pinescript-strategies/pine-script-VolumeAdjustedRSI.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Volume Oscillator</b>", "link": "pinescript-strategies/pine-script-volume-oscillator.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Twiggs Money Flow</b>", "link": "pinescript-strategies/pine-script-twiggs-money-flow.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Pivot Points</b>", "link": "pinescript-strategies/pine-script-PivotPoints.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Fibonacci Retracements</b>", "link": "pinescript-strategies/pine-script-FibonacciRetracements.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Camarilla Pivots</b>", "link": "pinescript-strategies/pine-script-CamarillaPivots.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Woodie Pivots</b>", "link": "pinescript-strategies/pine-script-WoodiePivots.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Tom Demark Pivots</b>", "link": "pinescript-strategies/pine-script-TomDemarkPivots.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Murrey Math Lines</b>", "link": "pinescript-strategies/pine-script-MurreyMathLines.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Gann Square Of Nine</b>", "link": "pinescript-strategies/pine-script-GannSquareOfNine.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Volume Profile</b>", "link": "pinescript-strategies/pine-script-VolumeProfile.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Anchored VWAP</b>", "link": "pinescript-strategies/pine-script-AnchoredVWAP.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Engulfing (Bullish/Bearish)</b>", "link": "pinescript-strategies/pine-script-engulfing.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Hammer</b>", "link": "pinescript-strategies/pine-script-hammer.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Hanging Man</b>", "link": "pinescript-strategies/pine-script-hanging-man.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Morning Star</b>", "link": "pinescript-strategies/pine-script-morning-star.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Evening Star</b>", "link": "pinescript-strategies/pine-script-evening-star.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Doji</b>", "link": "pinescript-strategies/pine-script-doji.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Piercing Line</b>", "link": "pinescript-strategies/pine-script-piercing-line.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Dark Cloud Cover</b>", "link": "pinescript-strategies/pine-script-dark-cloud-cover.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Three White Soldiers</b>", "link": "pinescript-strategies/pine-script-three-white-soldiers.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Three Black Crows</b>", "link": "pinescript-strategies/pine-script-three-black-crows.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Harami (Bullish/Bearish)</b>", "link": "pinescript-strategies/pine-script-harami.html", "level": "Expert" },
{ "title": "<small>Profitable Pinescript Strategies on -</small> <b>Shooting Star</b>", "link": "pinescript-strategies/pine-script-shooting-star.html", "level": "Expert" }
];
// Function to generate a unique ID
function generateUniqueId() {
return 'row-' + Date.now() + '-' + Math.random().toString(36).substr(2, 9);
}
function generateCards(titlesToRender = blogTitles) { // Default to all titles
const mainContainer = document.getElementById('mainCardsGridContainer');
mainContainer.innerHTML = ''; // Clear existing content
const cardsPerRow = 7;
let currentRowContainer = null;
let cardCountInCurrentRow = 0;
titlesToRender.forEach((el, index) => {
const title = el.title;
const link = el.link;
// Create a new row container if needed for the current card
if (cardCountInCurrentRow === 0) {
currentRowContainer = document.createElement('div');
currentRowContainer.className = 'card-row-container'; // Add a class for styling/selection
currentRowContainer.id = generateUniqueId(); // Assign a unique ID
mainContainer.appendChild(currentRowContainer);
}
// Determine income level based on title content
let incomeLevel = el.level;
// if (title.includes('$1') || title.includes('$1250') || title.includes('$1500') || title.includes('$1750')) {
// incomeLevel = 'intermediate';
// } else if (title.includes('$2') || title.includes('$2500') || title.includes('$3000') || title.includes('$5000')) {
// incomeLevel = 'advanced';
// }
const card = document.createElement('div');
card.className = `card ${incomeLevel}`;
card.innerHTML = `
<div class="card-body">
<a class="anchor" href="https://offline-pixel.github.io/${link}">
<h3 class="card-title"><span class="card-number"># ${index + 1}</span>${title}</h3>
<span class="income-badge">${incomeLevel} Level</span>
</a>
</div>
`;
currentRowContainer.appendChild(card);
cardCountInCurrentRow++;
// Reset count if the current row is full, preparing for the next row
if (cardCountInCurrentRow >= cardsPerRow) {
cardCountInCurrentRow = 0;
}
});
// After generating, apply the scroll animation offsets
applyRowScrollAnimationOffsets();
}
function applyRowScrollAnimationOffsets() {
const rowContainers = document.querySelectorAll('.card-row-container');
const scrollY = window.scrollY || window.pageYOffset; // Get current scroll position
const scrollSpeed = 0.06; // Adjust sensitivity
rowContainers.forEach((row, index) => {
let translateXValue;
if (index % 2 === 0) { // Even row (0, 2, 4...)
translateXValue = -scrollY * scrollSpeed;
} else { // Odd row (1, 3, 5...)
translateXValue = scrollY * scrollSpeed;
}
row.style.transform = `translateX(${translateXValue}px)`;
});
}
// Function to apply filter logic
function applyFilter(filter) {
let filteredTitles = [];
if (filter === 'all') {
filteredTitles = blogTitles; // Show all titles
} else {
// Filter blogTitles based on incomeLevel (re-determining level for each title)
filteredTitles = blogTitles.filter(el => {
const title = el.title
let incomeLevel = el.level;
// if (title.includes('$1') || title.includes('$1250') || title.includes('$1500') || title.includes('$1750')) {
// incomeLevel = 'intermediate';
// } else if (title.includes('$2') || title.includes('$2500') || title.includes('$3000') || title.includes('$5000')) {
// incomeLevel = 'advanced';
// }
return incomeLevel === filter;
});
}
// Re-generate the entire grid with only the filtered titles
generateCards(filteredTitles);
// Re-apply the animation delays for the new set of cards (if you have the ::after animation)
applyCardAnimationDelay();
}
// Function to apply staggering animation delay to individual cards (if you have the ::after animation)
function applyCardAnimationDelay() {
const cards = document.querySelectorAll('.card');
cards.forEach((card, index) => {
// Ensure --stat-card-animation-delay-offset is defined in your CSS :root
const delayOffset = parseFloat(getComputedStyle(document.documentElement).getPropertyValue('--stat-card-animation-delay-offset') || '0.1');
card.style.setProperty('--card-animation-delay', `${index * delayOffset}s`);
});
}
// Filter functionality for buttons
document.querySelectorAll('.filter-btn').forEach(button => {
button.addEventListener('click', () => {
// Update active button
document.querySelectorAll('.filter-btn').forEach(btn => btn.classList.remove('active'));
button.classList.add('active');
const filter = button.dataset.filter;
applyFilter(filter);
});
});
// Event listener for the main scroll animation effect
window.addEventListener('scroll', applyRowScrollAnimationOffsets);
// Initialize cards and apply default filter on page load
window.onload = () => {
generateCards(); // Generate all cards initially
const defaultActiveButton = document.querySelector('.filter-btn.active');
if (defaultActiveButton) {
const defaultFilter = defaultActiveButton.dataset.filter;
applyFilter(defaultFilter); // Apply the default filter
} else {
applyFilter('all');
}
// Initial application of card animation delays (if needed)
applyCardAnimationDelay();
// Initial application of row scroll animation
applyRowScrollAnimationOffsets();
};
</script>
<script src="scripts/scripts.js" defer></script>
</body>
</html>