Trading product for E7 BBKG NumSharp Sample cBot AI, image 1
cBot
243 downloads
Version 1.0, Feb 2025
Windows, Mac, Mobile, Web
Trading product for E7 BBKG NumSharp Sample cBot AI, image 2
Seit 18/12/2024
2
Verkäufe
4.17K
Kostenlose Installationen

Wie von vielen von Ihnen gewünscht, arbeiten wir nun intensiv daran, Beispiele für einige unserer Machine-Learning-Codes und -Pakete bereitzustellen.

TensorFlow, PyTorch, Keras, Numpy, Pandas und viele weitere .NET-Pakete, um in cTrader loszulegen.

Unsere Mission ist es, Machine Learning in cTrader für alle einfacher zu machen.

Viel Erfolg bei der Suche!

*** Dieser Code handelt nichts (er gibt nur Daten usw. aus). Es ist einfach Beispielcode, wie Sie mit unseren Machine-Learning-Paketen eigene KI-Modelle erstellen können.

.......................................................

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cAlgo.API;
using cAlgo.API.Collections;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;

using NumSharp;
using np = NumSharp.np;
using Shape = NumSharp.Shape;

using PandasNet;
using static PandasNet.PandasApi;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class E7BBKGNumSharpSample : Robot
    {
        [Parameter("Version 1.01", DefaultValue = "Version 1.01")]
        public string Version { get; set; }

        [Parameter("Quelle")]
        public DataSeries Source { get; set; }

        [Parameter("Benötigte Balken", DefaultValue = 50, MinValue = 1, MaxValue = 10000, Step = 1)]
        public int BarsRequired { get; set; }

        [Parameter("Methodenname", DefaultValue = MethodName.DataSplitPrints)]
        public MethodName Mode { get; set; }
        public enum MethodName
        {
            DataSplitPrints,
            PandasPrints,
            NDArrayPrints
        }
        
        protected override void OnStart()
        {
            // Initialisiere alle Indikatoren
        }

        protected override void OnBar()
        {
            try
            {
                if (Mode == MethodName.DataSplitPrints)
                {
                    DataSplitPrints();
                }
                else if (Mode == MethodName.PandasPrints)
                {
                    PandasPrints();
                }
                else if (Mode == MethodName.NDArrayPrints)
                {
                    NDArrayPrints();
                }
            }
            catch (Exception ex)
            {
                Print($"Fehler: {ex.Message}");
                if (ex.InnerException != null)
                {
                    Print($"Innere Ausnahme: {ex.InnerException.Message}");
                    throw;
                }
            }
        }

        private float[,] GetDataSet()
        {
            int startBar = Bars.ClosePrices.Count - BarsRequired;
            float[,] inputSignals = new float[BarsRequired, 5];

            for (int i = 0; i < BarsRequired; i++)
            {
                int barIndex = startBar + i;
                inputSignals[i, 0] = (float)Bars.OpenPrices[barIndex];
                inputSignals[i, 1] = (float)Bars.HighPrices[barIndex];
                inputSignals[i, 2] = (float)Bars.LowPrices[barIndex];
                inputSignals[i, 3] = (float)Bars.ClosePrices[barIndex];
                inputSignals[i, 4] = (float)Bars.TickVolumes[barIndex];
            }
            return inputSignals;
        }
        
        private float[,] GetTargetDataSet()
        {
            int startBar = Bars.ClosePrices.Count - BarsRequired;
            float[,] inputSignals = new float[BarsRequired, 5];

            for (int i = 0; i < BarsRequired; i++)
            {
                int barIndex = startBar + i;
                inputSignals[i, 0] = (float)Bars.OpenPrices[barIndex];
                inputSignals[i, 1] = (float)Bars.HighPrices[barIndex];
                inputSignals[i, 2] = (float)Bars.LowPrices[barIndex];
                inputSignals[i, 3] = (float)Bars.ClosePrices[barIndex];
                inputSignals[i, 4] = (float)Bars.TickVolumes[barIndex];
            }
            return inputSignals;
        }
        
        /// NumSharp Datenaufteilung Ausgaben
        public void DataSplitPrints()
        {
            // Formatiere Eingabedaten um, damit sie der erwarteten Eingabeform des Modells entsprechen
            //var inputShape = new Shape(-1, BarsRequired, 5);
            NDArray inputData = np.array<float>(GetDataSet());
            Print("Eingabe NDarray: " + string.Join(", ", inputData));
            
            // Formatiere Ziel-Daten um, damit sie der vom Modell erwarteten Ziel-Form entsprechen
            //var targetShape = new Shape(-1, 5);
            NDArray targetData = np.array<float>(GetTargetDataSet());
            Print("Ziel NDarray: " + string.Join(", ", targetData));
            
            // Teile Daten in Trainings- und Testsets auf
            int testSize = (int)(0.2 * inputData.shape[0]); // 20% für Tests
            var (x_train, x_test) = (inputData[$":{inputData.shape[0] - testSize}"], inputData[$"{inputData.shape[0] - testSize}:"]);
            var (y_train, y_test) = (targetData[$":{targetData.shape[0] - testSize}"], targetData[$"{targetData.shape[0] - testSize}:"]);
            
            Print("X_train Daten: " + string.Join(", ", x_train));
            Print("X_test Daten: " + string.Join(", ", x_test));
            Print("Y_train Daten: " + string.Join(", ", y_train));
            Print("Y_test Daten: " + string.Join(", ", y_test));
        }
        
        /// PandasNet Ausgaben
        public void PandasPrints()
        {
            // Konvertiere float[,] zu List<Series>
            var inputData = GetDataSet();
            var targetData = GetTargetDataSet();
            
            var inputSeriesList = new List<Series>();
            var targetSeriesList = new List<Series>();
            
            for (int col = 0; col < inputData.GetLength(1); col++)
            {
                List<float> columnData = new List<float>();
                for (int row = 0; row < inputData.GetLength(0); row++)
                {
                    columnData.Add(inputData[row, col]);
                }
                inputSeriesList.Add(new Series(columnData.ToArray()));
            }
            
            for (int col = 0; col < targetData.GetLength(1); col++)
            {
                List<float> columnData = new List<float>();
                for (int row = 0; row < targetData.GetLength(0); row++)
                {
                    columnData.Add(targetData[row, col]);
                }
                targetSeriesList.Add(new Series(columnData.ToArray()));
            }
            
            // Erstelle DataFrames
            DataFrame inputDataFrame = new DataFrame(inputSeriesList);
            DataFrame targetDataFrame = new DataFrame(targetSeriesList);
            
            Print("Eingabe DataFrame: " + inputDataFrame);
            Print("Ziel DataFrame: " + targetDataFrame);
            
            //Print("Eingabe DataFrame: " + string.Join(", ", inputDataFrame));
            //Print("Ziel DataFrame: " + string.Join(", ", targetDataFrame));
        }
        
        /// Einfache NumSharp NDArray-Ausgaben
        public void NDArrayPrints()
        {
            if (Bars.ClosePrices.Count < BarsRequired)
                return;

            try
            {
                // Aufruf Ihrer Eingabedaten float[,]
                float[,] inputData = GetDataSet();

                // Konvertiere zu NDArray und forme um zu (BarsRequired, 5)
                NDArray inputNDArray = np.array(inputData);   // NumSharp
                Print("Eingabe NumSharp NDarray Daten : " + string.Join(", ", inputNDArray));
                Print("Eingabe NumSharp NDarray Form: " + string.Join(", ", inputNDArray.shape));
                
                int erwarteteLänge = BarsRequired * 5;
                Print($"Erwartete NumSharp NDarray Länge: {erwarteteLänge}");
                Print($"Eingabe NumSharp NDarray Größe: {inputNDArray.size}");

                if (inputNDArray.size != erwarteteLänge)
                {
                    Print($"Längenabweichung: Erwartete Länge {erwarteteLänge}, aber Größe {inputNDArray.size} erhalten");
                    return;
                }
            }
            catch (Exception ex)
            {
                Print("Ausnahme: " + ex.Message);
                Print("StackTrace: " + ex.StackTrace);

                Exception innerException = ex.InnerException;
                while (innerException != null)
                {
                    Print("Innere Ausnahme: " + innerException.Message);
                    Print("StackTrace der inneren Ausnahme: " + innerException.StackTrace);
                    innerException = innerException.InnerException;
                }
            }
        }
    }
}

Handelsprofil
0.0
Bewertungen: 0
Kundenbewertungen
Bisher gibt es keine Bewertungen für dieses Produkt. Haben Sie es schon ausprobiert? Dann können Sie die erste Person sein, die andere darüber informiert!
AI
Über den cTrader Store verfügbare Produkte, einschließlich Handelsbots, Indikatoren und Plugins, werden von externen Entwicklern bereitgestellt und nur zu Informations- und technischen Zugriffszwecken verfügbar gemacht. cTrader Store ist kein Broker und erbringt keine Anlageberatung, persönlichen Empfehlungen oder eine Garantie für zukünftige Performance.

Mehr von diesem Autor

Indikator
E7 Volume Profile, more modern look and feel.
Indikator
Prop
E7 BBKG indicator with 80% plus accuracy used to show both, possible reversal and trend.
Indikator
Polynomial Regression Channel which also reflects the volatility of the underlying asset.
Indikator
E7 Harmonic Structures Basic.
Indikator
E7 Correlation Dashboard.
Indikator
Bollinger
Bollinger Band Cloud, Heiken Ashi, Trend Follower and Parabolic SAR.
Indikator
Indices
Option pricing using the BlackScholes model and the Math.Numerics packages
Indikator
Bollinger
ADXR, KDJ, SineWave, Bollinger Band Volatility and AEOscillator.

Das könnte Sie auch noch interessieren

cBot
ATR
RSI
+11
proactive swing detection and entry with multiple trade filters..high stable returns,minimal drawdowns
cBot
Prop Firm Fit
Stop Loss (SL) Manager
+1
HTS Strategy Tester - Advanced Multi-Timeframe Trend & Pullback Trading System H1/m1 & H4/m5 WWS 33/144 Start from 100$
90.1%
Rendite
2.92
Gewinnfaktor
cBot
AI
ATR
+27
Depth of Market + VIX Bot - Complete Analysis
cBot
Prop
Forex
+4
cBot designed to assist traders in managing position risk effectively.
cBot
Forex
EURUSD
+4
Capture London volatility automatically with smart risk sizing and clean breakout logic.
20.1%
Rendite
1.24
Gewinnfaktor
cBot
ATR
Indices
+1
This cBot trades and profits from small reversions while managing risk through systematic position scaling.
cBot
Forex
BTCUSD
+9
cBot : Hand Trade Assistant
cBot
ATR
No Overtrading
+3
Intelligent negotiations and analysis Voice-based price action !Limited time offer!
21.2%
Rendite
3
Gewinnfaktor
cBot
Prop
Forex
+13
SUPPORT AND RESISTANCE STRATEGY. Master the Market’s Turning Points with Surgical Accuracy. SEE THE FULL BACKTEST. 📈
cBot
AI
ATR
+27
Overnight trades? Pc needs shut down? Sleep disruption from alerts? Could have avoided Loss with BE Partial Monitored ?
cBot
ADX
ATR
+5
Analyze quarterly cycles and weekly seasonality patterns across multiple instruments with historical bias data
cBot
Perfectly optimized to trade XAUUSD. Win rate of about 85 to 90%.
cBot
Volume
Conservative
+5
Quantum Bot - Trial Version : The Ultimate Forex Trading Solution for Consistent Growth00
14.6%
Rendite
4.01
Gewinnfaktor
cBot
ATR
SL Manager
+3
Este cBot está diseñado para operar rupturas de rango en BTCUSD con una logica simple
49.6%
Rendite
1.44
Gewinnfaktor
cBot
ATR
Aggressive
+5
FREE backtest-only. Reproduce Pegasus Gold's +141.99% in your own cTrader - no grid, no martingale. REAL EDGE.
2.08
Gewinnfaktor
cBot
AI
ATR
+21
A price-action-first algorithm to trade Breakout, Approach, and Return around prior High/Low levels—with Prop-style risk
cBot
AI Trading
Drawdown Guard
+2
Intelligent Automated Trading (Gold, Forex, commodities)
1.97
Gewinnfaktor
Seit 18/12/2024
2
Verkäufe
4.17K
Kostenlose Installationen