This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # com 포트 송신 | |
| import serial # PySerial | |
| import time | |
| from cobs import cobs # pip install cobs 필요 | |
| def run_serial_tx(): | |
| port = "COM15" | |
| baudrate = 1000000 # baud rate 1 Mbps. USB CDC 로 인식된 com에서는 이 설정값이 통신속도 제한하지 않음. 아무거나 기록해됨. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import serial # PySerial | |
| import time | |
| def run_serial_receiver(): | |
| port = "COM15" | |
| baudrate = 1000000 # baud rate 1 Mbps. USB CDC 로 인식된 com에서는 이 설정값이 통신속도 제한하지 않음. 아무거나 기록해됨. | |
| try: | |
| # 1. COM 포트 오픈 (타임아웃은 non-blocking을 위해 0으로 설정 가능) | |
| ser = serial.Serial( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import serial # PySerial | |
| import time | |
| # que, thread 위해 포함. | |
| import queue | |
| import threading | |
| # [스레드 핵심 1] 멀티스레드 안전한 전역 큐 버퍼 생성 | |
| # maxsize 지정하여 소비가 밀릴 때 메모리가 무한히 늘어나는 것 방지. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # com 포트 송신 | |
| import serial # PySerial | |
| import time | |
| def run_serial_tx(): | |
| port = "COM15" | |
| baudrate = 1000000 # baud rate 1 Mbps. USB CDC 로 인식된 com에서는 이 설정값이 통신속도 제한하지 않음. 아무거나 기록해됨. | |
| # 송신할 임의의 데이터 정의 (원하는 바이트 값을 바이트 배열로 기록) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Get-ChildItem -Recurse -Include *.cpp, *.h, *.cs, *.hpp | ForEach-Object { | |
| $filePath = $_.FullName | |
| # 1. 파일의 첫 3바이트를 읽어 BOM 확인 | |
| $bytes = [System.IO.File]::ReadAllBytes($filePath) | |
| $isUtf8Bom = $bytes.Length -ge 3 -and $bytes[0] -eq 0xEF -and $bytes[1] -eq 0xBB -and $bytes[2] -eq 0xBF | |
| if ($isUtf8Bom) { | |
| Write-Host "이미 UTF-8 BOM임 (건너뜀): $($_.Name)" -ForegroundColor Yellow |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #region Using declarations | |
| using System; | |
| using System.Collections.Generic; | |
| using System.ComponentModel; | |
| using System.ComponentModel.DataAnnotations; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using System.Windows; | |
| using System.Windows.Input; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #region Using declarations | |
| using System; | |
| using System.Collections.Generic; | |
| using System.ComponentModel; | |
| using System.ComponentModel.DataAnnotations; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using System.Windows; | |
| using System.Windows.Input; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// .h | |
| #include "resource.h" | |
| class CFixStatusDlg : public CDialogEx | |
| { | |
| DECLARE_DYNAMIC(CFixStatusDlg) | |
| public: | |
| explicit CFixStatusDlg(CWnd* pParent = nullptr); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| 2025.11.25 | |
| 파일명 : CyTool_Candle_2_Sqlite_Multi.mq5 | |
| 여러 종목의 캔들 데이터를 SQLite DB 로 저장. | |
| mt5 의 아무챠트에서 실행해도 사용자 입력에서 지정된 여러 심볼들의 과거 캔들 확보하여 DB 파일로 저장. | |
| 모든 심볼의 메타 데이터 테이블. | |
| 테이블명 : A_SymbolMeta |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //@version=6 | |
| strategy("Simple SMA Cross Strategy", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100) | |
| // ───────────── Input Parameters ───────────── | |
| fastLen = input.int(9, title="Fast MA Length") | |
| slowLen = input.int(21, title="Slow MA Length") | |
| takeProfit = input.float(2.0, title="Take Profit %", step=0.1) | |
| stopLoss = input.float(1.0, title="Stop Loss %", step=0.1) | |
| // ───────────── Indicators ───────────── |
NewerOlder