Spaces:
Running
Running
Oviya commited on
Commit ·
26a0a10
1
Parent(s): 36c63e8
prediciton update
Browse files
src/app/analysispage/analysispage.html
CHANGED
|
@@ -125,22 +125,33 @@
|
|
| 125 |
</mat-card>
|
| 126 |
|
| 127 |
<mat-card>
|
| 128 |
-
<h1>
|
| 129 |
|
| 130 |
<div class="chart-content">
|
| 131 |
<div class="predict-content">
|
| 132 |
-
<
|
| 133 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 134 |
</div>
|
| 135 |
-
<apx-chart
|
| 136 |
-
[
|
| 137 |
-
[
|
| 138 |
-
[
|
| 139 |
-
[
|
|
|
|
|
|
|
|
|
|
|
|
|
| 140 |
</apx-chart>
|
| 141 |
</div>
|
| 142 |
-
|
| 143 |
</mat-card>
|
|
|
|
| 144 |
<mat-card>
|
| 145 |
<h1>Trade Recommendations</h1>
|
| 146 |
|
|
|
|
| 125 |
</mat-card>
|
| 126 |
|
| 127 |
<mat-card>
|
| 128 |
+
<h1>Prediction Chart for next 15 days</h1>
|
| 129 |
|
| 130 |
<div class="chart-content">
|
| 131 |
<div class="predict-content">
|
| 132 |
+
<div>
|
| 133 |
+
<p style="color: #22C55E;">Predicted Max High Date: {{result[activeCompany].ai_predicted_max_high_15_date}}</p>
|
| 134 |
+
<p style="color: #22C55E;">Predicted Max High Date: {{result[activeCompany].ai_predicted_max_high_15}}</p>
|
| 135 |
+
</div>
|
| 136 |
+
<div>
|
| 137 |
+
<p style="color: #EF4444; ">Predicted Min Low Date: {{result[activeCompany].ai_predicted_min_low_15_date}}</p>
|
| 138 |
+
<p style="color: #EF4444; ">Predicted Min Low: {{result[activeCompany].ai_predicted_min_low_15}}</p>
|
| 139 |
+
</div>
|
| 140 |
+
|
| 141 |
</div>
|
| 142 |
+
<apx-chart *ngIf="highLowChartOptions"
|
| 143 |
+
[series]="highLowChartOptions.series"
|
| 144 |
+
[chart]="highLowChartOptions.chart"
|
| 145 |
+
[xaxis]="highLowChartOptions.xaxis"
|
| 146 |
+
[yaxis]="highLowChartOptions.yaxis"
|
| 147 |
+
[stroke]="highLowChartOptions.stroke"
|
| 148 |
+
[markers]="highLowChartOptions.markers"
|
| 149 |
+
[tooltip]="highLowChartOptions.tooltip"
|
| 150 |
+
[legend]="highLowChartOptions.legend">
|
| 151 |
</apx-chart>
|
| 152 |
</div>
|
|
|
|
| 153 |
</mat-card>
|
| 154 |
+
|
| 155 |
<mat-card>
|
| 156 |
<h1>Trade Recommendations</h1>
|
| 157 |
|
src/app/analysispage/analysispage.ts
CHANGED
|
@@ -37,6 +37,7 @@ export class Analysispage implements OnInit {
|
|
| 37 |
strategyChart: any;
|
| 38 |
strategyChartIndex: number = 0;
|
| 39 |
predictedChart: any;
|
|
|
|
| 40 |
selectedIndicator: any = 'RSI';
|
| 41 |
selectedStrategy: any = 'RSI 14';
|
| 42 |
activeCompany: number = 0;
|
|
@@ -148,11 +149,11 @@ export class Analysispage implements OnInit {
|
|
| 148 |
}
|
| 149 |
|
| 150 |
loadCharts() {
|
| 151 |
-
|
| 152 |
|
| 153 |
// close price chart
|
| 154 |
|
| 155 |
-
|
| 156 |
|
| 157 |
// Optional: keep sorted and remove duplicate dates
|
| 158 |
const closeSeries = [...data]
|
|
@@ -164,7 +165,7 @@ export class Analysispage implements OnInit {
|
|
| 164 |
chart: { type: 'area', height: 400, width: 1200 },
|
| 165 |
series: [
|
| 166 |
{
|
| 167 |
-
name:'Close',
|
| 168 |
data: closeSeries // [{x: '2025-08-01', y: 2350.9}, ...]
|
| 169 |
}
|
| 170 |
],
|
|
@@ -176,17 +177,17 @@ export class Analysispage implements OnInit {
|
|
| 176 |
opposite: true,
|
| 177 |
labels: { style: { colors: '#ffffff' } }
|
| 178 |
},
|
| 179 |
-
|
| 180 |
tooltip: {
|
| 181 |
theme: 'dark'
|
| 182 |
-
|
| 183 |
}
|
| 184 |
};
|
| 185 |
|
| 186 |
|
| 187 |
//candlestick chart
|
| 188 |
|
| 189 |
-
|
| 190 |
this.candlestickChartOptions = {
|
| 191 |
chart: { type: 'candlestick', height: 400, width: 1200 },
|
| 192 |
series: [{ name: this.activeCompany, data }], // x can be a plain string when type='category'
|
|
@@ -199,7 +200,7 @@ export class Analysispage implements OnInit {
|
|
| 199 |
labels: { style: { colors: '#ffffff' } }
|
| 200 |
},
|
| 201 |
tooltip: { theme: 'dark' }
|
| 202 |
-
};
|
| 203 |
|
| 204 |
}
|
| 205 |
|
|
@@ -269,45 +270,49 @@ export class Analysispage implements OnInit {
|
|
| 269 |
|
| 270 |
|
| 271 |
|
| 272 |
-
const prediction_prices = this.result[this.activeCompany]['prediction_prices']
|
| 273 |
-
const prediction_dates = this.result[this.activeCompany]['prediction_dates']
|
| 274 |
|
| 275 |
-
this.predictedChart = {
|
| 276 |
-
series: [
|
| 277 |
-
{
|
| 278 |
-
name: "Predicted Price",
|
| 279 |
-
data: prediction_prices.map((value: any) => Number(value.toFixed(2))),
|
| 280 |
-
color: '#38BDF8'
|
| 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 |
|
|
@@ -327,7 +332,7 @@ export class Analysispage implements OnInit {
|
|
| 327 |
this.strategyChartIndex--;
|
| 328 |
}
|
| 329 |
}
|
| 330 |
-
|
| 331 |
nextChart(): void {
|
| 332 |
if (this.strategyChartIndex < this.strategyChart.length - 1) {
|
| 333 |
this.strategyChartIndex++;
|
|
@@ -335,10 +340,3 @@ export class Analysispage implements OnInit {
|
|
| 335 |
}
|
| 336 |
|
| 337 |
}
|
| 338 |
-
|
| 339 |
-
|
| 340 |
-
|
| 341 |
-
|
| 342 |
-
|
| 343 |
-
|
| 344 |
-
|
|
|
|
| 37 |
strategyChart: any;
|
| 38 |
strategyChartIndex: number = 0;
|
| 39 |
predictedChart: any;
|
| 40 |
+
highLowChartOptions: any;
|
| 41 |
selectedIndicator: any = 'RSI';
|
| 42 |
selectedStrategy: any = 'RSI 14';
|
| 43 |
activeCompany: number = 0;
|
|
|
|
| 149 |
}
|
| 150 |
|
| 151 |
loadCharts() {
|
| 152 |
+
|
| 153 |
|
| 154 |
// close price chart
|
| 155 |
|
| 156 |
+
const data = this.result[this.activeCompany]['ohlc_data'] as Array<{ x: string; y: [number, number, number, number] }>;
|
| 157 |
|
| 158 |
// Optional: keep sorted and remove duplicate dates
|
| 159 |
const closeSeries = [...data]
|
|
|
|
| 165 |
chart: { type: 'area', height: 400, width: 1200 },
|
| 166 |
series: [
|
| 167 |
{
|
| 168 |
+
name: 'Close',
|
| 169 |
data: closeSeries // [{x: '2025-08-01', y: 2350.9}, ...]
|
| 170 |
}
|
| 171 |
],
|
|
|
|
| 177 |
opposite: true,
|
| 178 |
labels: { style: { colors: '#ffffff' } }
|
| 179 |
},
|
| 180 |
+
|
| 181 |
tooltip: {
|
| 182 |
theme: 'dark'
|
| 183 |
+
|
| 184 |
}
|
| 185 |
};
|
| 186 |
|
| 187 |
|
| 188 |
//candlestick chart
|
| 189 |
|
| 190 |
+
|
| 191 |
this.candlestickChartOptions = {
|
| 192 |
chart: { type: 'candlestick', height: 400, width: 1200 },
|
| 193 |
series: [{ name: this.activeCompany, data }], // x can be a plain string when type='category'
|
|
|
|
| 200 |
labels: { style: { colors: '#ffffff' } }
|
| 201 |
},
|
| 202 |
tooltip: { theme: 'dark' }
|
| 203 |
+
};
|
| 204 |
|
| 205 |
}
|
| 206 |
|
|
|
|
| 270 |
|
| 271 |
|
| 272 |
|
|
|
|
|
|
|
| 273 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 274 |
|
| 275 |
+
// Predicted High/Low 15-day chart (single chart with two series)
|
| 276 |
+
const highsRaw = this.result[this.activeCompany].ai_predicted_daily_high_15 ?? [];
|
| 277 |
+
const lowsRaw = this.result[this.activeCompany].ai_predicted_daily_low_15 ?? [];
|
| 278 |
+
const dates15 = this.result[this.activeCompany].ai_predicted_dates_15 ?? [];
|
| 279 |
+
|
| 280 |
+
const highs = highsRaw.map((v: any) => Number(Number(v).toFixed(2)));
|
| 281 |
+
const lows = lowsRaw.map((v: any) => Number(Number(v).toFixed(2)));
|
| 282 |
+
|
| 283 |
+
if (highs.length && lows.length && dates15.length && highs.length === lows.length && highs.length === dates15.length) {
|
| 284 |
+
this.highLowChartOptions = {
|
| 285 |
+
chart: { type: 'line', height: 400, width: 1500, toolbar: { show: false } },
|
| 286 |
+
series: [
|
| 287 |
+
{ name: 'Predicted High', data: highs, color: '#22C55E' }, // green
|
| 288 |
+
{ name: 'Predicted Low', data: lows, color: '#EF4444' } // red
|
| 289 |
+
],
|
| 290 |
+
stroke: { width: 2, curve: 'smooth' },
|
| 291 |
+
markers: { size: 3 },
|
| 292 |
+
xaxis: { categories: dates15, type: 'category', tickPlacement: 'on', labels: { rotate: -45, rotateAlways: true, hideOverlappingLabels: false, trim: false, minHeight: 70, style: { colors: '#ffffff', fontSize: '12px' } } },
|
| 293 |
+
yaxis: {
|
| 294 |
+
opposite: true,
|
| 295 |
+
labels: { style: { colors: '#ffffff' } }
|
| 296 |
},
|
| 297 |
+
tooltip: {
|
| 298 |
+
shared: true,
|
| 299 |
+
intersect: false,
|
| 300 |
+
theme: 'dark',
|
| 301 |
+
y: {
|
| 302 |
+
formatter: (val: number) => (val != null ? val.toFixed(2) : '')
|
| 303 |
+
}
|
| 304 |
},
|
| 305 |
+
legend: {
|
| 306 |
+
position: 'top',
|
| 307 |
+
labels: {
|
| 308 |
+
colors: '#ffffff',
|
| 309 |
+
useSeriesColors: false
|
| 310 |
+
}
|
| 311 |
+
}
|
| 312 |
+
};
|
| 313 |
+
} else {
|
| 314 |
+
this.highLowChartOptions = null;
|
| 315 |
+
}
|
| 316 |
}
|
| 317 |
|
| 318 |
|
|
|
|
| 332 |
this.strategyChartIndex--;
|
| 333 |
}
|
| 334 |
}
|
| 335 |
+
|
| 336 |
nextChart(): void {
|
| 337 |
if (this.strategyChartIndex < this.strategyChart.length - 1) {
|
| 338 |
this.strategyChartIndex++;
|
|
|
|
| 340 |
}
|
| 341 |
|
| 342 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/app/homepage/homepage.html
CHANGED
|
@@ -38,18 +38,18 @@
|
|
| 38 |
</div>
|
| 39 |
<div class="footer-center">
|
| 40 |
<ul class="footer-links">
|
| 41 |
-
<li><a href="https://pykara.ai/
|
| 42 |
<li><a href="https://pykara.ai/contact-us/" target="_blank">Contact</a></li>
|
| 43 |
-
<li><a href="
|
| 44 |
-
<li><a href="
|
| 45 |
</ul>
|
| 46 |
</div>
|
| 47 |
<div class="footer-right">
|
| 48 |
<div class="social-media">
|
| 49 |
-
<a href="https://facebook.com" target="_blank" aria-label="Facebook"><i class="fab fa-facebook"></i></a>
|
| 50 |
<a href="https://www.youtube.com/@PykaraTechnologies/videos" target="_blank" aria-label="Youtube"><i class="fab fa-youtube"></i></a>
|
| 51 |
<a href="https://www.linkedin.com/in/pykara-technologies" target="_blank" aria-label="LinkedIn"><i class="fab fa-linkedin"></i></a>
|
| 52 |
-
<a href="https://instagram.com" target="_blank" aria-label="Instagram"><i class="fab fa-instagram"></i></a>
|
| 53 |
</div>
|
| 54 |
</div>
|
| 55 |
</div>
|
|
|
|
| 38 |
</div>
|
| 39 |
<div class="footer-center">
|
| 40 |
<ul class="footer-links">
|
| 41 |
+
<li><a href="https://pykara.ai/" target="_blank">About Us</a></li>
|
| 42 |
<li><a href="https://pykara.ai/contact-us/" target="_blank">Contact</a></li>
|
| 43 |
+
<li><a href="" target="_blank">Privacy Policy</a></li>
|
| 44 |
+
<li><a href="" target="_blank">Terms & Conditions</a></li>
|
| 45 |
</ul>
|
| 46 |
</div>
|
| 47 |
<div class="footer-right">
|
| 48 |
<div class="social-media">
|
| 49 |
+
<a href="https://www.facebook.com/profile.php?id=100087653675803" target="_blank" aria-label="Facebook"><i class="fab fa-facebook"></i></a>
|
| 50 |
<a href="https://www.youtube.com/@PykaraTechnologies/videos" target="_blank" aria-label="Youtube"><i class="fab fa-youtube"></i></a>
|
| 51 |
<a href="https://www.linkedin.com/in/pykara-technologies" target="_blank" aria-label="LinkedIn"><i class="fab fa-linkedin"></i></a>
|
| 52 |
+
<a href="https://www.instagram.com/pykaratechnologie/" target="_blank" aria-label="Instagram"><i class="fab fa-instagram"></i></a>
|
| 53 |
</div>
|
| 54 |
</div>
|
| 55 |
</div>
|