present
Daftar dan dapatkan diskon $50 untuk pembelian pertama Anda
Trading product for E7 BBKG NumSharp Sample cBot AI, image 1
E7 BBKG NumSharp Sample
cBot
276 unduhan
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
Penjualan
4.36K
Instal gratis

Deskripsi

Seperti yang diminta oleh banyak dari Anda, kami sekarang bekerja keras untuk menyediakan contoh beberapa kode dan paket pembelajaran mesin kami.

TensorFlow, PyTorch, Keras, Numpy, Pandas dan banyak paket .NET lainnya untuk memulai di dalam cTrader.

Misi kami adalah membuat Pembelajaran Mesin di dalam cTrader menjadi lebih mudah untuk semua orang.

Selamat berburu!

*** Kode ini tidak melakukan perdagangan apapun (hanya mencetak data dll). Ini hanyalah contoh kode bagaimana Anda dapat mulai membuat model AI Anda sendiri menggunakan paket 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("Jumlah Bar Diperlukan", DefaultValue = 50, MinValue = 1, MaxValue = 10000, Step = 1)]
        public int BarsRequired { get; set; }

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

        protected override void OnBar()
        {
            coba
            {
                jika (Mode == MethodName.DataSplitPrints)
                {
                    DataSplitPrints();
                }
                lain jika (Mode == MethodName.PandasPrints)
                {
                    PandasPrints();
                }
                lain jika (Mode == MethodName.NDArrayPrints)
                {
                    NDArrayPrints();
                }
            }
            tangkap (Exception ex)
            {
                Print($"Kesalahan: {ex.Message}");
                jika (ex.InnerException != null)
                {
                    Print($"Inner Exception: {ex.InnerException.Message}");
                    lempar;
                }
            }
        }

        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 Pembagian Data NumSharp
        public void DataSplitPrints()
        {
            // Mengubah bentuk data input agar sesuai dengan bentuk input yang diharapkan model
            //var inputShape = new Shape(-1, BarsRequired, 5);
            NDArray inputData = np.array<float>(GetDataSet());
            Print("Input NDarray: " + string.Join(", ", inputData));
            
            // Mengubah bentuk data target agar sesuai dengan bentuk target yang diharapkan model
            //var targetShape = new Shape(-1, 5);
            NDArray targetData = np.array<float>(GetTargetDataSet());
            Print("Target NDarray: " + string.Join(", ", targetData));
            
            // Membagi data menjadi set pelatihan dan pengujian
            int testSize = (int)(0.2 * inputData.shape[0]); // 20% untuk pengujian
            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()
        {
            // Mengonversi float[,] ke 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()));
            }
            
            // Membuat DataFrame
            DataFrame inputDataFrame = new DataFrame(inputSeriesList);
            DataFrame targetDataFrame = new DataFrame(targetSeriesList);
            
            Print("DataFrame Input: " + inputDataFrame);
            Print("DataFrame Target: " + targetDataFrame);
            
            //Print("DataFrame Input: " + string.Join(", ", inputDataFrame));
            //Print("DataFrame Target: " + string.Join(", ", targetDataFrame));
        }
        
        /// Cetakan NDArrays NumSharp Sederhana
        public void NDArrayPrints()
        {
            jika (Bars.ClosePrices.Count < BarsRequired)
                kembali;

            coba
            {
                // Memanggil Data Input float[,] Anda
                float[,] inputData = GetDataSet();

                // Mengonversi ke NDArray dan mengubah bentuk menjadi (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 yang Diharapkan: {expectedLength}");
                Print($"Ukuran NumSharp NDarray Input: {inputNDArray.size}");

                jika (inputNDArray.size != expectedLength)
                {
                    Print($"Ketidaksesuaian Panjang: Panjang yang Diharapkan {expectedLength}, tetapi mendapatkan Ukuran {inputNDArray.size}");
                    kembali;
                }
            }
            tangkap (Exception ex)
            {
                Print("Exception: " + ex.Message);
                Print("StackTrace: " + ex.StackTrace);

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

Ringkasan

Ringkasan AI
E7 BBKG NumSharp Sample is a cTrader robot providing sample code to demonstrate integration of machine learning libraries within the cTrader environment. It includes examples using .NET packages such as TensorFlow, PyTorch, Keras, NumSharp, and PandasNet. The robot does not execute trades but prints out processed data to illustrate how users can start building AI models for trading analysis.

Key functionalities include:
- Data extraction from market bars (open, high, low, close prices, and tick volumes) over a configurable number of bars.
- Conversion of this data into formats compatible with machine learning workflows, including NumSharp NDArrays and Pandas DataFrames.
- Methods to split data into training and testing sets, and to print these datasets for inspection.
- Three operational modes selectable via parameters: DataSplitPrints, PandasPrints, and NDArrayPrints, each demonstrating different data handling approaches.

This sample code aims to facilitate machine learning development inside cTrader by providing foundational examples of data preparation and manipulation using popular ML libraries in a .NET context.
Profil trading

Ulasan pelanggan

0.0
Ulasan: 0
Ulasan pelanggan
Belum ada ulasan untuk produk ini. Sudah mencobanya? Jadilah pemberi ulasan pertama!

Diskusi

Pertanyaan umum

AI
Produk-produk yang tersedia melalui cTrader Store, termasuk bot trading, indikator, dan plugin, disediakan oleh pengembang pihak ketiga serta hanya ditujukan untuk akses teknis dan informasi. cTrader Store bukan broker dan tidak menyediakan saran investasi, rekomendasi pribadi, atau jaminan apa pun tentang kinerja di masa mendatang.

Produk lain dari penulis ini

Indikator
E7 Volume Profile, more modern look and feel.
Logo "E7 BBKG Indicator"
Peringkat teratas
4.5
(4)
$25
/
$50
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 mungkin juga suka

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
AI
ATR
+27
Depth of Market + VIX Bot - Complete Analysis
cBot
Grid Recovery
Position Sizer
+1
Preconfigured EURUSD recovery cBot for M1 with a fixed 0.01 starting lot and optional equity protection.
1.67
Faktor laba
cBot
Prop
Forex
+6
PropFirm Forex trader
cBot
ATR
Indices
🚀N.B.: Results with an initial invested capital of 100 euros.
cBot
AI Trading
AI Integration
Export cTrader market data to CSV or JSON for Python, AI, backtesting and quantitative research.
cBot
Volume
Equity Stop
+5
M-Algo EURUSD M1 PRO is a recovery/grid cBot for EURUSD M1 with 4 sizing modes and advanced risk controls.
1.67
Faktor laba
cBot
ADX
ATR
+5
Analyze quarterly cycles and weekly seasonality patterns across multiple instruments with historical bias data
cBot
AI
ATR
+5
No guessing — just confirmed breakouts, smart risk management, and disciplined execution. Less noise. More direction.
28.5%
ROI
4.44
Faktor laba
cBot
Signal
Supertrend
Bot is based on Price Action strategy to open & manage orders. It is effective capital management and high profitability
cBot
AI
ATR
+5
Professional Gold Trading System - 1-Year Backtest Validation(2025-2026)
20.5%
ROI
1.8
Faktor laba
cBot
RSI
Forex
+3
Wealthcraft Auto Profit is a smart trading robot with Auto Stop-Loss, Trailing Stop, and maximum profit management
cBot
Prop
Forex
+2
Ultimate Trade Panel - a powerful, on-chart trading tool designed for precision and efficiency.
0.01
Faktor laba
cBot
Grid
Prop
+1
Prop Firm bot using Parabolic SAR for trends, opening hourly trades with grid management and tight risk control.
cBot
ATR
Grid
+1
Intelligent system, Available any instrument. Profit 12. Drawdown 5%
cBot
SL Manager
Break Even
+4
FRACTAL STOP LOSS BOT AND RISK MANAGER
cBot
BOS
CHOCH
+5
Ai_SMC Trading Robot v2 – Precision Smart Money Concept Automation
1.4
Faktor laba
cBot
Prop Firm Fit
Trailing Stop
+4
Copy trades remotely from different computers with risk management, prop firm compliance, and dynamic lot sizing.

Harga

Sejak 18/12/2024
2
Penjualan
4.36K
Instal gratis