Şartname

Hello. I have a custom NinjaScript indicator that is not compiling correctly. Can anyone take a look at it and see if you can resolve the errors? This code plots offset lines above and below the 14 ema,


using System; using System.Windows.Media; namespace GeneralTradingApp { public class ProfitTargetTickOffset { public int TickCount { get; set; } public Brush UpperLineColor { get; set; } public Brush LowerLineColor { get; set; } public ProfitTargetTickOffset(int tickCount, Brush upperColor, Brush lowerColor) { TickCount = tickCount; UpperLineColor = upperColor ?? Brushes.SlateGray; LowerLineColor = lowerColor ?? Brushes.SlateGray; } public void CalculateLines(double emaValue, double tickSize) { double upperLine = emaValue + TickCount * tickSize; double lowerLine = emaValue - TickCount * tickSize; Console.WriteLine($"Upper Line: {upperLine}, Color: {UpperLineColor}"); Console.WriteLine($"Lower Line: {lowerLine}, Color: {LowerLineColor}"); } } class Program { static void Main() { // Example usage ProfitTargetTickOffset offset = new ProfitTargetTickOffset(24, Brushes.Blue, Brushes.Red); double exampleEMAValue = 1200.5; // Replace with actual logic for EMA calculation double tickSize = 0.01; // Replace with actual tick size offset.CalculateLines(exampleEMAValue, tickSize); } } }


Dosyalar:

PNG
snip_1.PNG
21.1 Kb
PNG
snip_2.PNG
21.0 Kb

Yanıtlandı

1
Geliştirici 1
Derecelendirme
(3)
Projeler
1
0%
Arabuluculuk
5
0% / 100%
Süresi dolmuş
0
Serbest
2
Geliştirici 2
Derecelendirme
(11)
Projeler
15
20%
Arabuluculuk
6
0% / 100%
Süresi dolmuş
3
20%
Serbest
3
Geliştirici 3
Derecelendirme
(1)
Projeler
1
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest

Proje bilgisi

Bütçe
30+ USD
Son teslim tarihi
from 1 to 5 gün