present
新規登録で初回購入時に$50オフ
Trading product for E7 BBKG NumSharp Sample cBot AI, image 1
E7 BBKG NumSharp Sample
cBot
281 ダウンロード数
バージョン 1.0、Feb 2025
Windows、Mac, Mobile, Web
Trading product for E7 BBKG NumSharp Sample cBot AI, image 2
登録日 18/12/2024
2
販売
4.43K
無料インストール

説明

多くの方からのご要望により、現在、当社の機械学習コードやパッケージのいくつかの例を提供するために懸命に取り組んでいます。

TensorFlow、PyTorch、Keras、Numpy、Pandas、そして多くの.NETパッケージをcTrader内で利用開始できます。

私たちの使命は、cTrader内での機械学習を誰にとってもより簡単にすることです。

ハッピー・ハンティング!

*** このコードは何も取引しません(データを出力するだけです)。これは、当社の機械学習パッケージを使用して独自のAIモデルを作成し始める方法のサンプルコードに過ぎません。

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

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("Source")]
        public DataSeries Source { get; set; }

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

        [Parameter("Method Name", DefaultValue = MethodName.DataSplitPrints)]
        public MethodName Mode { get; set; }
        public enum MethodName
        {
            DataSplitPrints,
            PandasPrints,
            NDArrayPrints
        }
        
        protected override void OnStart()
        {
            // インジケーターを初期化します
        }

        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($"エラー: {ex.Message}");
                if (ex.InnerException != null)
                {
                    Print($"内部例外: {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 データ分割プリント
        public void DataSplitPrints()
        {
            // モデルの期待する入力形状に合わせて入力データをリシェイプ
            //var inputShape = new Shape(-1, BarsRequired, 5);
            NDArray inputData = np.array<float>(GetDataSet());
            Print("入力NDarray: " + string.Join(", ", inputData));
            
            // モデルが期待するターゲット形状に合わせてターゲットデータをリシェイプ
            //var targetShape = new Shape(-1, 5);
            NDArray targetData = np.array<float>(GetTargetDataSet());
            Print("ターゲットNDarray: " + string.Join(", ", targetData));
            
            // データをトレーニングセットとテストセットに分割
            int testSize = (int)(0.2 * inputData.shape[0]); // テスト用に20%
            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 データ: " + string.Join(", ", x_train));
            Print("X_test データ: " + string.Join(", ", x_test));
            Print("Y_train データ: " + string.Join(", ", y_train));
            Print("Y_test データ: " + string.Join(", ", y_test));
        }
        
        /// PandasNet プリント
        public void PandasPrints()
        {
            // float[,] を 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()));
            }
            // DataFrameを作成
            DataFrame inputDataFrame = new DataFrame(inputSeriesList);
            DataFrame targetDataFrame = new DataFrame(targetSeriesList);
            
            Print("入力DataFrame: " + inputDataFrame);
            Print("ターゲットDataFrame: " + targetDataFrame);
            
            //Print("Input DataFrame: " + string.Join(", ", inputDataFrame));
            //Print("Target DataFrame: " + string.Join(", ", targetDataFrame));
        }
        
        /// シンプルなNumSharp NDArraysプリント
        public void NDArrayPrints()
        {
            if (Bars.ClosePrices.Count < BarsRequired)
                return;

            try
            {
                // 入力データ float[,] を呼び出す
                float[,] inputData = GetDataSet();

                // NDArrayに変換し (BarsRequired, 5) にリシェイプ
                NDArray inputNDArray = np.array(inputData);   // NumSharp
                Print("入力NumSharp NDarrayデータ : " + string.Join(", ", inputNDArray));
                Print("入力NumSharp NDarray形状: " + string.Join(", ", inputNDArray.shape));
                
                int expectedLength = BarsRequired * 5;
                Print($"期待されるNumSharp NDarrayの長さ: {expectedLength}");
                Print($"入力NumSharp NDarrayのサイズ: {inputNDArray.size}");

                if (inputNDArray.size != expectedLength)
                {
                    Print($"長さ不一致: 期待長さ {expectedLength}、しかしサイズは {inputNDArray.size} でした");
                    return;
                }
            }
            catch (Exception ex)
            {
                Print("例外: " + ex.Message);
                Print("スタックトレース: " + ex.StackTrace);

                Exception innerException = ex.InnerException;
                while (innerException != null)
                {
                    Print("内部例外: " + innerException.Message);
                    Print("内部例外スタックトレース: " + innerException.StackTrace);
                    innerException = innerException.InnerException;
                }
            }
        }
    }
}

概要

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.
取引プロフィール

カスタマーレビュー

0.0
レビュー: 0
カスタマーレビュー
この商品にはまだレビューがありません。お使いになったことがある方は、ぜひレビューをお願いします。

ディスカッション

よくあるご質問

AI
cTrader Storeで入手可能な取引ボット、インジケーター、プラグインなどの商品は、第三者の開発者が提供するものであり、情報と技術の取得のみを目的としてご利用いただけます。cTrader Storeはブローカーではなく、投資助言や個人的な推奨を行うことも、将来のパフォーマンスを保証することもありません。

この作成者の他の商品

インジケーター
E7 Volume Profile, more modern look and feel.
「E7 BBKG Indicator」ロゴ
トップ評価
4.5
(4)
$25
/
$50
インジケーター
Prop
E7 BBKG indicator with 80% plus accuracy used to show both, possible reversal and trend.
インジケーター
Polynomial Regression Channel which also reflects the volatility of the underlying asset.
インジケーター
E7 Harmonic Structures Basic.
インジケーター
E7 Correlation Dashboard.
インジケーター
Bollinger
Bollinger Band Cloud, Heiken Ashi, Trend Follower and Parabolic SAR.
インジケーター
Indices
Option pricing using the BlackScholes model and the Math.Numerics packages
インジケーター
Bollinger
ADXR, KDJ, SineWave, Bollinger Band Volatility and AEOscillator.
インジケーター
cTrader ID

これも好きかも

cBot
AI
Scalp you rich!
cBot
SL Manager
TP Manager
+4
Fast manual execution + automatic TP/SL management in one powerful cTrader trading panel.
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
プロフィットファクター
cBot
AI
BTCUSD
+2
Crossover Bot es un sistema de trading algorítmico actualmente en operación real, currently in live operation.
cBot
Forex
BTCUSD
+8
RiskPilot is a clean, fast trade panel for cTrader that sizes positions by account risk % in a single click.
cBot
XAU/USD SWING BOT
cBot
This algo uses two Exponential Moving Averages (EMAs): EMA 21 (fast) → reacts quickly to price changes. EMA 34 and 21
cBot
Forex
GBPUSD
+1
Presenting Emperor cbot - the revolutionary cbot that’s reshaping the way you approach, trading GBPUSD pair
cBot
SL Manager
Break Even
+5
Swing trading bot using body-based range breakout, volume fusion, and structured risk management for clean entries.
17%
ROI
2.74
プロフィットファクター
cBot
Fibonacci
TP Manager
+2
Harmonic Patterns Bots and Indicator: Automation and Precision
14.4%
ROI
2.5
プロフィットファクター
cBot
ATR
EMA
+5
Incorporate EMA, RSI, and ATR to detect strong trends and execute precise entries
cBot
ATR
Auto-manages SL, TP, and position size to enforce risk discipline. Never enter a trade without a plan again.
cBot
AI
ATR
+7
MR KRABS XAU 🦀🟡 — smart gold grid trading with ATR spacing, tight risk, and basket take-profit. 🎯
cBot
Forex
Scalping
Special H1-Version of UltimateScalper for EUR/GBP ... win rate 100% ... ROI 830%
cBot
Forex
EURUSD
+4
RISK SHIELD VERSION 2.0 - Smart Risk Manager for cTrader.
cBot
AI
XAUUSD
+4
Gold Pulse Pro – An automated trading system for gold (XAUUSD) precisely engineered and powered by advanced algorithms

価格

登録日 18/12/2024
2
販売
4.43K
無料インストール