Trading product for E7 BBKG NumSharp Sample cBot AI, image 1
cBot
240 muat turun
Versi 1.0, Feb 2025
Windows, Mac, Mobile, Web
Trading product for E7 BBKG NumSharp Sample cBot AI, image 2
Sejak 18/12/2024
2
Jualan
4.16K
Pemasangan percuma

Seperti yang diminta oleh ramai daripada anda, kami kini sedang bekerja keras untuk menyediakan contoh beberapa kod dan pakej pembelajaran mesin kami.

TensorFlow, PyTorch, Keras, Numpy, Pandas dan banyak lagi pakej .NET untuk memulakan di dalam cTrader.

Misi kami adalah untuk memudahkan Pembelajaran Mesin di dalam cTrader untuk semua orang.

Selamat memburu!

*** Kod ini tidak melakukan sebarang dagangan (ia hanya mencetak data dan sebagainya). Ia hanyalah kod contoh bagaimana anda boleh mula mencipta model AI anda sendiri menggunakan pakej Pembelajaran Mesin kami.

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

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("Versi 1.01", DefaultValue = "Versi 1.01")]
        public string Version { get; set; }

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

        [Parameter("Bar Diperlukan", DefaultValue = 50, MinValue = 1, MaxValue = 10000, Step = 1)]
        public int BarsRequired { get; set; }

        [Parameter("Nama Kaedah", DefaultValue = MethodName.DataSplitPrints)]
        public MethodName Mode { get; set; }
        public enum MethodName
        {
            DataSplitPrints,
            PandasPrints,
            NDArrayPrints
        }
        
        protected override void OnStart()
        {
            // Inisialisasi mana-mana indikator
        }

        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($"Ralat: {ex.Message}");
                if (ex.InnerException != null)
                {
                    Print($"Pengecualian Dalaman: {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;
        }
        
        /// Cetakan Pecahan Data NumSharp
        public void DataSplitPrints()
        {
            // Bentuk semula data input untuk memadankan bentuk input yang dijangka oleh model
            //var inputShape = new Shape(-1, BarsRequired, 5);
            NDArray inputData = np.array<float>(GetDataSet());
            Print("Input NDarray: " + string.Join(", ", inputData));
            
            // Bentuk semula data sasaran untuk memadankan bentuk sasaran yang dijangka oleh model
            //var targetShape = new Shape(-1, 5);
            NDArray targetData = np.array<float>(GetTargetDataSet());
            Print("Target NDarray: " + string.Join(", ", targetData));
            
            // Bahagikan data kepada set latihan dan ujian
            int testSize = (int)(0.2 * inputData.shape[0]); // 20% untuk ujian
            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("Data X_train: " + string.Join(", ", x_train));
            Print("Data X_test: " + string.Join(", ", x_test));
            Print("Data Y_train: " + string.Join(", ", y_train));
            Print("Data Y_test: " + string.Join(", ", y_test));
        }
        
        /// Cetakan PandasNet
        public void PandasPrints()
        {
            // Tukar float[,] kepada Senarai<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()));
            }
            
            // Cipta DataFrame
            DataFrame inputDataFrame = new DataFrame(inputSeriesList);
            DataFrame targetDataFrame = new DataFrame(targetSeriesList);
            
            Print("Input DataFrame: " + inputDataFrame);
            Print("Target DataFrame: " + targetDataFrame);
            
            //Print("Input DataFrame: " + string.Join(", ", inputDataFrame));
            //Print("Target DataFrame: " + string.Join(", ", targetDataFrame));
        }
        
        /// Cetakan NumSharp NDArrays Mudah
        public void NDArrayPrints()
        {
            if (Bars.ClosePrices.Count < BarsRequired)
                return;

            try
            {
                // Memanggil Data Input float[,] anda
                float[,] inputData = GetDataSet();

                // Tukar kepada NDArray dan bentuk semula kepada (BarsRequired, 5)
                NDArray inputNDArray = np.array(inputData);   // NumSharp
                Print("Data NumSharp NDarray Input : " + string.Join(", ", inputNDArray));
                Print("Bentuk NumSharp NDarray Input: " + string.Join(", ", inputNDArray.shape));
                
                int expectedLength = BarsRequired * 5;
                Print($"Panjang NumSharp NDarray Dijangka: {expectedLength}");
                Print($"Saiz NumSharp NDarray Input: {inputNDArray.size}");

                if (inputNDArray.size != expectedLength)
                {
                    Print($"Panjang Tidak Padan: Panjang Dijangka {expectedLength}, tetapi mendapat Saiz {inputNDArray.size}");
                    return;
                }
            }
            catch (Exception ex)
            {
                Print("Pengecualian: " + ex.Message);
                Print("Jejak Tumpukan: " + ex.StackTrace);

                Exception innerException = ex.InnerException;
                while (innerException != null)
                {
                    Print("Pengecualian Dalaman: " + innerException.Message);
                    Print("Jejak Tumpukan Pengecualian Dalaman: " + innerException.StackTrace);
                    innerException = innerException.InnerException;
                }
            }
        }
    }
}

Profil dagangan
0.0
Ulasan: 0
Ulasan pelanggan
Belum ada ulasan untuk produk ini. Anda sudah mencuba produk tersebut? Jadilah yang pertama untuk berkongsi pendapat anda!
AI
Produk yang tersedia melalui cTrader Store, termasuk bot dagangan, indikator dan plugin, disediakan oleh pembangun pihak ketiga dan diberikan akses untuk tujuan maklumat dan teknikal sahaja. cTrader Store bukan broker dan tidak memberikan nasihat pelaburan, syor peribadi atau sebarang jaminan prestasi masa hadapan.

Lebih banyak produk daripada penulis ini

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.

Anda juga mungkin suka

cBot
Prop
Forex
+2
Lock your risk before you click Buy or Sell. Entering a trade without clearly defined risk!
cBot
AI
Forex
+2
Sophisticated GRADIENTE algorithm , performance 11% per day drawdown 4%
cBot
Forex
Crypto
+3
This is a cBot that will detect trendlines on the chart and open trades when the price interacts with them.
cBot
Volume
Imbalance
+3
VOLUME IMBALANCE STRIP A focused multi-timeframe imbalance visualization tool for cTrader.
cBot
Conservative
Grid Recovery
Ziggy, an advanced algorithm designed to maximize efficiency and simplify profit control.
cBot
Grid
Forex
+9
This tool will help you spread your trades very quickly with a few clicks
cBot
ATR
SL Manager
+3
Este cBot está diseñado para operar rupturas de rango en BTCUSD con una logica simple
49.6%
ROI
1.44
Faktor keuntungan
cBot
Forex
EURUSD
+2
Amazing Gold Quantum TRIAL DAY 15
cBot
AI
RSI
+4
Please Try and ENJOY !!! Try default setting before making any changes Please!!
cBot
RSI
Grid
+1
This strategy opens grid trades based on Bollinger Bands and RSI, with customizable settings and strong risk management.
cBot
Forex
BTCUSD
+8
RiskPilot is a clean, fast trade panel for cTrader that sizes positions by account risk % in a single click.
cBot
ATR
NAS100
+5
A trading robot designed for traders who want precision for high-volatility markets (XAUUSD, US500, US100, WTI, others.)
cBot
Perfectly optimized to trade XAUUSD. Win rate of about 85 to 90%.
cBot
Grid
Crypto
+5
this is private product.
10.2%
ROI
1.8
Faktor keuntungan
cBot
AI
BTCUSD
+2
Crossover Bot es un sistema de trading algorítmico actualmente en operación real, currently in live operation.
cBot
ATR
No Overtrading
+3
Intelligent negotiations and analysis Voice-based price action !Limited time offer!
21.2%
ROI
3
Faktor keuntungan
cBot
AI Trading
Intelligent Automated Trading (Gold, Forex, commodities)
1.97
Faktor keuntungan
cBot
ATR
Prop
+4
🚀 HTF Power 3 (PO3) – Automated ICT AMD Strategy
70.2%
ROI
1.31
Faktor keuntungan
Sejak 18/12/2024
2
Jualan
4.16K
Pemasangan percuma