present
가입하고 첫 구매 시 $50 할인을 받으세요
Trading product for E7 BBKG NumSharp Sample cBot AI, image 1
E7 BBKG NumSharp Sample
cBot
306 다운로드
버전 1.0, Feb 2025
Windows, Mac, Mobile, Web
Trading product for E7 BBKG NumSharp Sample cBot AI, image 2
가입일 18/12/2024
2
판매
4.66K
무료 설치

설명

많은 분들의 요청에 따라, 이제 저희는 기계 학습 코드와 패키지의 예제를 제공하기 위해 열심히 작업하고 있습니다.

TensorFlow, PyTorch, Keras, Numpy, Pandas 및 cTrader 내에서 사용할 수 있는 다양한 .NET 패키지들.

저희의 목표는 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 inputDataFrame = new DataFrame(inputSeriesList);
            DataFrame targetDataFrame = new DataFrame(targetSeriesList);
            
            Print("입력 데이터프레임: " + inputDataFrame);
            Print("대상 데이터프레임: " + targetDataFrame);
            
            //Print("입력 데이터프레임: " + string.Join(", ", inputDataFrame));
            //Print("대상 데이터프레임: " + string.Join(", ", targetDataFrame));
        }
        
        /// 간단한 NumSharp NDArray 출력
        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 summary
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
고객 리뷰
이 상품에 대한 리뷰가 아직 없습니다. 이미 사용해 보셨나요? 다른 사람들에게 가장 먼저 소개해 주세요!

상담

자주 묻는 질문(FAQ)

AI
트레이딩 봇, 지표, 플러그인 등 cTrader Store에서 제공되는 상품은 제3자 개발자에 의해 제공되며, 이는 단순히 정보 및 기술적 접근을 목적으로 제공된 것입니다. cTrader Store는 중개인이 아니며, 투자 조언, 개인별 추천 또는 향후 성과에 대한 어떠한 보장도 제공하지 않습니다.

이 작성자의 상품 더 보기

지표
E7 Volume Profile, more modern look and feel.
지표
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.

좋아하실 만한 다른 항목

cBot
EMA
Balanced
+2
Pharaoh Bot Back tested for 6 years tick data
1.64
손익비
cBot
XAUUSD
Bollinger
+1
Sfrutta il breakout delle bande di bollinger.
cBot
ATR
Grid Recovery
+2
Modern griding bot with ATR features.
136%
ROI
2.36
손익비
cBot
Forex
BTCUSD
+13
SUPPORT AND RESISTANCE STRATEGY. Master the Market’s Turning Points with Surgical Accuracy. SEE THE FULL BACKTEST. 📈
cBot
Indices
DAX BOT FOR INTRADAY TRADING
cBot
EMA
Balanced
+4
AUD CAD PHAROH TRADING BOT Back tested 6 YEARS TICK DATA
1.64
손익비
cBot
Grid
Forex
+11
Semi bot will manage your position by moving stoploss and cover loss with 3 martingale style
cBot
BTCUSD
Automated cTrader bot with webhook support, trade management, take-profit levels, and Telegram notifications
cBot
Forex
Crypto
+5
Professional execution engine for the Visual Risk Terminal. Instant batch orders, PnL syncing, and automated hedging.
1
손익비
cBot
Forex
Stocks
+1
Gold Scalper V3 is an advanced fully automated scalping cBot designed specifically for XAUUSD (Gold).
cBot
AI
Grid
+4
Institutional-Grade AI for Retail Traders,Trade Like a Central Bank.
1.7
손익비
cBot
ATR
RSI
+5
📊 EMA CROSS COMPLETE BOT - Professional Trading System
2.1
손익비
cBot
Signal
Bollinger
This cBot uses a combination of Heikin Ashi and Bollinger Bands strategies.
cBot
ATR
RSI
+4
UltimateAI Trading Robot – Smart Trend & Momentum Trader for cTrader
cBot
Fixed Lot
Equity Stop
+5
Copy trades between cTrader accounts on one PC or VPS. Symbol names mapped across brokers for you. Three-step setup.
cBot
VWAP
Fibonacci
+5
Autonomous Nasdaq execution engine featuring VWAP confluence, macro sweeps, and strict prop-firm drawdown defense.
8%
ROI
11.67
손익비
cBot
AI
Scalp you rich!
cBot
Grid
Forex
+2
Hedging 12 Forex Symbols - Demo to 2025-12-31

가격

가입일 18/12/2024
2
판매
4.66K
무료 설치