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
Aggressive
Key Levels
+1
Grid key Level fast Clickers for XAUUSD only
cBot
AI
ATR
+27
RSI Simple Grid cBot - grid trading strategy with RSI (Relative Strength Index) signals
26.8%
Rendite
4.41
Gewinnfaktor
cBot
RSI
Grid
+8
DragonRSIcBot is an RSI-driven grid/martingale cBot
cBot
AI
ATR
+9
Gold Predict AI – Advanced Predictive Trading for XAUUSD (M15)
cBot
ATR
No Overtrading
+3
Intelligent negotiations and analysis Voice-based price action !Limited time offer!
21.2%
Rendite
3
Gewinnfaktor
cBot
AI Trading
Drawdown Guard
+2
Intelligent Automated Trading (Gold, Forex, commodities)
1.97
Gewinnfaktor
cBot
AI
RSI
+4
Smart Trend Trading Bot, Best Trend Identified, Please try default setting before making any changes
cBot
Forex
Scalping
Special H1-Version of UltimateScalper for EUR/GBP ... win rate 100% ... ROI 830%
cBot
EURUSD
5K Challenge # Startcapital 500,- Euro
cBot
Volume
Balanced
+5
An automated utility featuring global drawdown control, basket trailing profit tracking, and custom session filters.
16.4%
Rendite
1.55
Gewinnfaktor
cBot
ATR
RSI
+6
Trend-following with deep pullbacks and advanced risk/position management.
cBot
Prop
Forex
+5
Close 50%, 80% or Custom % , Close Full position and Move Stop to Breakeven buttons plus a floating Profit/loss counter
cBot
RSI
This bot implements the well-known 2-period RSI strategy, enhanced by a powerful filter comprised of two exponential mov
cBot
Trading_stop Plus 🧾 General Description Trading_stop Plus is the complete, enhanced version of the original Trading_sto
cBot
Prop
Forex
+4
cBot designed to assist traders in managing position risk effectively.
cBot
AI
ATR
+7
MR KRABS XAU 🦀🟡 — smart gold grid trading with ATR spacing, tight risk, and basket take-profit. 🎯
cBot
AI
ATR
+27
Note on the Trial Version This version of the bot is a limited trial and will only work on Demo accounts for 7 days
cBot
EMA
SL Manager
+5
Fully automated dual-symbol hedging cBot for cTrader.
20.6%
Rendite
8.66
Gewinnfaktor
Seit 18/12/2024
2
Verkäufe
4.17K
Kostenlose Installationen