Rend ゲーム
0post
2025.12.08 02:00
:0% :0% (-/-)
人気のポスト ※表示されているRP数は特定時点のものです
Prompt:自由度非常高,发挥自己的想象!记得交作业!
我在评论区等你啊!不然都没有动力更新啊!
**[Type]:** A scanned page from a high-end Japanese photobook (Shashin-shu). **A 9-grid photo layout printed on textured matte art paper.**
**[Layout Design]:** The 9 photos are arranged in a clean grid with **wide white margins** at the bottom to accommodate typography.
**[Subject Consistency - STRICT]:**
* **Source:** Based strictly on the uploaded reference image. **[SAME CHARACTER IN ALL PANELS]**.
* **Styling Strategy:** **[RANDOMLY SELECT ONE]:**
1. **{Classic}:** Loose white shirt + shorts.
2. **{Soft}:** Beige knit cardigan + camisole.
3. **{Pure}:** **White lace-trimmed slip dress** (Best for bath transitions).
* **Note:** In Row 3 (Bath), outfit creates a "wet look" or shows skin.
**[Typography & Japanese Elements - THE ARTISTIC TOUCH]:**
*(AI must render a title text in the bottom white margin)*
**[RANDOMLY SELECT ONE Title Theme]:**
1. **{Theme: Summer}:** Large Japanese text **"青い夏"** with small English text **"BLUE SUMMER"** below it.
2. **{Theme: Private}:** Large Japanese text **"私小説"** with small English text **"PRIVATE NOVEL"** below it.
3. **{Theme: Air}:** Large Japanese text **"空気感"** with small English text **"AIRY MOMENTS"** below it.
* **Signature:** The handwritten text **"By : Berryxia"** is placed artistically next to the title or in the corner like a watermark.
**[Grid Narrative - The "Day to Night" Journey]:**
**Row 1: Outdoor Breath (Wind & Light)**
1. **Top-Left (Wide):** Subject standing in wind, hair blowing, **backlit by sun**.
2. **Top-Middle (Detail):** Close-up of **hand holding a glass bottle of soda** or blocking the sun.
3. **Top-Right (Motion):** Blurry candid shot of subject **walking away on a street**.
**Row 2: Indoor Play (Props & "Hiding")**
4. **Center-Left (Hiding):** Subject sitting on tatami, **using a dried flower to cover one eye**.
5. **Center (Candid):** Subject **lying upside down on a sofa**, reading a book, face partially hidden.
6. **Center-Right (Fetish):** Focus on **bare feet curled on the rug** or fingers touching hair.
**Row 3: Private/Wet (Steam & Skin)**
7. **Bottom-Left (Steamy Back):** **Back view in a steamy bathroom**. Wet hair sticking to nape of neck. Soft focus.
8. **Bottom-Middle (Immersion):** Subject **submerged in bathtub**, water up to chin. Dreamy high-key lighting.
9. **Bottom-Right (End):** Detail of **steam on a mirror**.
**[Aesthetic Style]:**
* **Film Stock:** Fujifilm Pro 400H (Cyan shadows, airy highlights).
* **Texture:** **Visible paper texture**, slight vignetting, layout design style.
**[Parameters]:** --ar 2:3 --style raw --v 6.0 --stylize 200 --cref [URL] --cw 80 --no commercial smile, stiff posing, studio lighting 使用室内旅馆内风格B输出 December 12, 2025
かわいい☺️
🍌用プロンプト置いておきます... AIに食わせて好きな作品にアレンジすれば良し
著作権モノなので個人利用の範囲でお楽しみください
{
"style_name": "3D Q-Version Healing Toy Movie Poster - Laputa: Castle in the Sky (Optimized)",
"style_description": "A highly tactile 3D digital rendering style mimicking macro product photography of premium designer toy collectibles. It transforms the world and characters of Laputa: Castle in the Sky into cute, Q-version miniature dioramas. The core aesthetic relies on the contrast between matte resin/vinyl surfaces and soft, flocked plush textures, bathed in warm, diffused light to create a calm, healing atmosphere with clean bilingual poster typography.",
"style_prompt": {
"positive": "A tactile 3D digital render mimicking high-end product photography of collectible designer toys presented as a movie poster for Laputa: Castle in the Sky. Cute Q-version proportions. The defining feature is mixed materials: smooth matte resin or vinyl for bodies, armor, and stone ruins contrasting with soft, fuzzy flocked plush textures on Sheeta's long hair, dress ribbons, moss, vines, plants, and small animals. Miniature floating island diorama with ancient Laputa ruins, gentle glowing flight stone, soft greenery, and subtle sky background. Lighting is soft, warm, and diffused with gentle dappled shadows (komorebi effect), golden hour feel, creating a calm, healing atmosphere. Shallow depth of field, macro lens effect, creamy bokeh background. Clean bilingual typography.",
"negative": "2D illustration, painting, pixel art, low poly, rough sketch, realistic human proportions, harsh direct lighting, hard dark shadows, glossy plastic shine, metallic reflections, noisy grain, blurry textures, distressed or grungy look, aggressive mood, dark themes, excessive ornamental decoration on text elements, war machines, military elements, scary robots."
},
"composition_guidelines": {
"top_element": {
"content_goal": "Stylized Bilingual Movie Title",
"visual_directive": {
"position": "Top center, prominent placement.",
"font_style": "Cute, decorative serif or rounded font subtly incorporating tiny leaf or flight-stone crystal motifs.",
"structure": "Large Japanese title above smaller English subtitle.",
"japanese_text": "天空の城ラピュタ",
"english_text": "Laputa: Castle in the Sky"
}
},
"center_element": {
"content_goal": "Main Character(s) in Miniature Diorama",
"visual_directive": {
"subject_style": "Cute, proportional Q-version toy figurines of Sheeta and Pazu gently holding hands, with small robot soldier or fox squirrel nearby.",
"material_focus": "Emphasize the contrast between matte skin/stone/ruins versus flocked long flowing hair, soft dress, moss-covered surfaces, and lush plants.",
"environment": "A self-contained, soft-focus miniature floating island diorama with mossy ancient stones, gentle glowing flight stone, tiny trees and flowers, faint silhouette of Laputa castle in the distant sky."
}
},
"bottom_element": {
"content_goal": "Healing Interpretation Quote",
"visual_directive": {
"position": "Bottom center, grounding the composition.",
"font_style": "Refined, clean serif or elegant handwritten style. Small and subtle.",
"decoration_style": "Minimalist. Clean text only. Avoid excessive scrolls, banners, ornate lines, or complex decorative borders.",
"example_japanese_quote": "空と大地をつなぐ、優しい魔法",
"example_english_quote": "A gentle magic that connects sky and earth"
}
}
},
"rendering_and_atmosphere": {
"lighting_style": "Soft, warm, diffused natural light with golden hour feel. Gentle, non-harsh shadows and dappled light effects through leaves and clouds are highly encouraged.",
"camera_lens": "Macro photography aesthetic. Very shallow depth of field, focusing sharply on the toy textures while blurring the foreground and background into soft creamy bokeh.",
"emotional_mood": "Warm, calm, cozy, safe, nostalgic, and healing."
},
"usage_notes": {
"best_suited_for": "Transforming the adventurous yet poignant world of Laputa: Castle in the Sky into comforting, collectible merchandise form while preserving its themes of nature, peace, and wonder.",
"key_success_factor": "The success of this style hinges on the convincing rendering of the 'flocked/fuzzy' texture on Sheeta's hair, plants, and moss against the 'smooth matte' stone and resin surfaces, combined with gentle lighting to sell the 'healing' vibe."
}
} December 12, 2025
KING SWING RENDEZ-VOUS vol.03
2025.12.30 at harevutai
▶︎▷▶︎チケット先着販売中◀︎◁◀︎
KS 会員 Ticket
https://t.co/vEzx7inXMG
一般 Ticket
https://t.co/LXDHUCU659
KS会員限定イベント 『KING SWING RENDEZ-VOUS』の第3回目が12月30日(火)に東京池袋で開催!2025年の締めくくりに、ファン同士がリアルな空間で共鳴し合う、“RENDEZ-VOUS”なひとときをお楽しみください。
「KING SWING会員限定」とご案内しておりますが、より多くの人に体験していただく機会を提供したいため一部枠を限定解除して一般販売いたします。
詳細はこちら!
https://t.co/UuYc4FxK8s December 12, 2025
做了一个简化版的交易系统逻辑总结
作用:识别市场从趋势到震荡再到突破的完整生命周期,并在每个阶段采用策略。
以下是数学语言和代码👇:
(代码太长了,删了一部分,可以根据数学语言自己推)
价格序列与技术指标:
Pt=第t期收盘价Pt=第t期收盘价
Ht,Lt,Ot,Vt=最高价、最低价、开盘价、成交量Ht,Lt,Ot,Vt=最高价、最低价、开盘价、成交量
ATRt=1n∑i=0n−1TRt−iATRt=n1i=0∑n−1TRt−i
其中:TRt=max(Ht−Lt,∣Ht−Pt−1∣,∣Lt−Pt−1∣)TRt=max(Ht−Lt,∣Ht−Pt−1∣,∣Lt−Pt−1∣)
箱体结构参数:
BoxHigh=maxi∈[t−W,t]HiBoxHigh=i∈[t−W,t]maxHi
BoxLow=mini∈[t−W,t]LiBoxLow=i∈[t−W,t]minLi
BoxHeight=BoxHigh−BoxLowBoxHeight=BoxHigh−BoxLow
建议窗口期 W=30∼50W=30∼50 根K线。
相对位置函数:
PositionRatiot=Pt−BoxLowBoxHeightPositionRatiot=BoxHeightPt−BoxLow
分层结构:
Leveli=BoxLow+i×BoxHeight4,i∈{0,1,2,3,4}Leveli=BoxLow+i×4BoxHeight,i∈{0,1,2,3,4}
多维度震荡识别系统
震荡评分函数
构建四维评分体系来量化震荡状态:
ConsolidationScore=w1⋅Stime+w2⋅Sspace+w3⋅Svolatility+w4⋅SvolumeConsolidationScore=w1⋅Stime+w2⋅Sspace+w3⋅Svolatility+w4⋅Svolume
权重建议:w1=0.35,w2=0.30,w3=0.20,w4=0.15w1=0.35,w2=0.30,w3=0.20,w4=0.15
时间维度评分
整理时间比率:
Rtime=TconsolidationTprevious_trendRtime=Tprevious_trendTconsolidation
时间评分函数:
Stime={0.2if Rtime<0.50.5if 0.5≤Rtime<1.00.8if 1.0≤Rtime<2.01.0if Rtime≥2.0Stime=⎩⎨⎧0.20.50.81.0if Rtime<0.5if 0.5≤Rtime<1.0if 1.0≤Rtime<2.0if Rtime≥2.0
空间维度评分
边界测试频率:
TestFrequency=∑i=t−Nt1(∣Pi−BoxEdge∣<ϵ)NTestFrequency=N∑i=t−Nt1(∣Pi−BoxEdge∣<ϵ)
其中 ϵ=0.02×BoxHeightϵ=0.02×BoxHeight(边界容差)
箱体强度评分:
Sspace={1.0if UpperTests≥3∧LowerTests≥3∧Breaks=00.7if TotalTests≥4∧Breaks≤10.4if TotalTests≥2∧Breaks≤20otherwiseSspace=⎩⎨⎧1.00.70.40if UpperTests≥3∧LowerTests≥3∧Breaks=0if TotalTests≥4∧Breaks≤1if TotalTests≥2∧Breaks≤2otherwise
波动率维度评分
波动率收敛指标:
VolatilityRatio=ATRcurrentATRtrendVolatilityRatio=ATRtrendATRcurrent
波动率评分:
Svolatility={1.0if VolatilityRatio<0.50.7if 0.5≤VolatilityRatio<0.70.4if 0.7≤VolatilityRatio<0.90if VolatilityRatio≥0.9Svolatility=⎩⎨⎧1.00.70.40if VolatilityRatio<0.5if 0.5≤VolatilityRatio<0.7if 0.7≤VolatilityRatio<0.9if VolatilityRatio≥0.9
成交量维度评分
量能萎缩度:
VolumeDecay=1−Volume‾consolidationVolume‾trendVolumeDecay=1−VolumetrendVolumeconsolidation
成交量评分:
Svolume=min(VolumeDecay×2,1.0)Svolume=min(VolumeDecay×2,1.0)
状态判断逻辑
MarketState={Consolidationif ConsolidationScore>0.65Trendif ConsolidationScore<0.35UncertainotherwiseMarketState=⎩⎨⎧ConsolidationTrendUncertainif ConsolidationScore>0.65if ConsolidationScore<0.35otherwise
三状态交易系统设计
状态机框架
定义三个核心状态:
Ω={Strend,Sconsolidation,Sbreakout}Ω={Strend,Sconsolidation,Sbreakout}
状态转移条件:
Strend→SconsolidationStrend→Sconsolidation:
TrendStrength<0.3∧ConsolidationScore>0.5TrendStrength<0.3∧ConsolidationScore>0.5
Sconsolidation→SbreakoutSconsolidation→Sbreakout:
BreakoutStrength>0.7∧ValidBreakout=TrueBreakoutStrength>0.7∧ValidBreakout=True
区间交易策略(震荡状态)
做空信号生成:
ShortSignalrange={1if PositionRatio>0.75∧TopReversalSignal=True∧RSI>60∧Volume<Volume‾20×0.90otherwiseShortSignalrange=⎩⎨⎧10if PositionRatio>0.75∧TopReversalSignal=True∧RSI>60∧Volume<Volume20×0.9otherwise
顶部反转识别:
TopReversalSignal={Trueif UpperShadowRatio>0.4∧Close<Open∧Close<EMA13FalseotherwiseTopReversalSignal=⎩⎨⎧TrueFalseif UpperShadowRatio>0.4∧Close<Open∧Close<EMA13otherwise
其中:UpperShadowRatio=Ht−max(Ot,Pt)Ht−LtUpperShadowRatio=Ht−LtHt−max(Ot,Pt)
仓位与风控:
Positionrange=Capital×RiskRatio×0.5∣EntryPrice−StopLoss∣Positionrange=∣EntryPrice−StopLoss∣Capital×RiskRatio×0.5
StopLossrange=BoxHigh×(1+SafetyMargin)StopLossrange=BoxHigh×(1+SafetyMargin)
建议 SafetyMargin=0.04∼0.05SafetyMargin=0.04∼0.05
突破跟随策略(突破状态)
突破强度评分:
BreakoutStrength=0.4⋅Sprice+0.3⋅Svolume+0.3⋅SpersistenceBreakoutStrength=0.4⋅Sprice+0.3⋅Svolume+0.3⋅Spersistence
各分量计算:
价格突破深度:
Sprice=min(∣BoxLow−Pt∣BoxLow×10,1.0)Sprice=min(BoxLow∣BoxLow−Pt∣×10,1.0)
成交量放大度:
Svolume=min(VtV‾20−1,1.0)Svolume=min(V20Vt−1,1.0)
持续性确认:
Spersistence=∑i=021(Closet−i<BoxLow)3Spersistence=3∑i=021(Closet−i<BoxLow)
有效突破判断:
ValidBreakout={Trueif BreakoutStrength>0.7∧Pt<BoxLow×0.98∧NoRecentFalseBreak=TrueFalseotherwiseValidBreakout=⎩⎨⎧TrueFalseif BreakoutStrength>0.7∧Pt<BoxLow×0.98∧NoRecentFalseBreak=Trueotherwise
回踩机会识别
回踩窗口定义:
PullbackWindow=[tbreakout,tbreakout+MaxWaitBars]PullbackWindow=[tbreakout,tbreakout+MaxWaitBars]
建议 MaxWaitBars=20MaxWaitBars=20
回踩位置评估:
PullbackRatio=Pt−LowestAfterBreakBoxLow−LowestAfterBreakPullbackRatio=BoxLow−LowestAfterBreakPt−LowestAfterBreak
理想回踩区间:0.382≤PullbackRatio≤0.6180.382≤PullbackRatio≤0.618
回踩做空信号:
ShortSignalpullback={1if t∈PullbackWindow∧PullbackRatio∈[0.382,0.618]∧∣Pt−BoxLow∣<0.03×BoxHeight∧RejectionSignal=True0otherwiseShortSignalpullback=⎩⎨⎧10if t∈PullbackWindow∧PullbackRatio∈[0.382,0.618]∧∣Pt−BoxLow∣<0.03×BoxHeight∧RejectionSignal=Trueotherwise
动态资金分配模型
自适应分配函数
αt=αbase+Δα⋅f(ConsolidationScoret)αt=αbase+Δα⋅f(ConsolidationScoret)
基础分配:
αbase=0.75(保守策略基础占比)αbase=0.75(保守策略基础占比)
动态调整:
Δα=0.2×(1−ConsolidationScoret)Δα=0.2×(1−ConsolidationScoret)
约束条件:0.6≤αt≤0.90.6≤αt≤0.9
资金分配:
Capitalrange=TotalCapital×αtCapitalrange=TotalCapital×αt
Capitalbreakout=TotalCapital×(1−αt)Capitalbreakout=TotalCapital×(1−αt)
代码:
import numpy as np import pandas as pd from dataclasses import dataclass from typing import Optional, Tuple, Dict, List from enum import Enum class MarketState(Enum): TREND_DOWN = "TREND_DOWN" CONSOLIDATION = "CONSOLIDATION" BREAKOUT = "BREAKOUT" UNCERTAIN = "UNCERTAIN" @dataclass class ConsolidationMetrics: """震荡评估指标""" time_score: float space_score: float volatility_score: float volume_score: float total_score: float market_state: MarketState @dataclass class BoxStructure: """箱体结构""" high: float low: float height: float level_075: float level_050: float level_025: float upper_tests: int lower_tests: int duration: int is_valid: bool @classmethod def from_prices(cls, highs: np.ndarray, lows: np.ndarray, prices: np.ndarray, window: int = 50): """从价格数据构建箱体""" box_high = np.max(highs[-window:]) box_low = np.min(lows[-window:]) box_height = box_high - box_low # 计算关键位置 level_075 = box_low + 0.75 * box_height level_050 = box_low + 0.50 * box_height level_025 = box_low + 0.25 * box_height # 计算边界测试次数 epsilon = 0.02 * box_height upper_tests = np.sum(np.abs(prices - box_high) < epsilon) lower_tests = np.sum(np.abs(prices - box_low) < epsilon) # 验证有效性 is_valid = ( box_height / box_low > 0.15 and upper_tests >= 2 and lower_tests >= 2 and len(prices) >= 20 ) return cls( high=box_high, low=box_low, height=box_height, level_075=level_075, level_050=level_050, level_025=level_025, upper_tests=upper_tests, lower_tests=lower_tests, duration=len(prices), is_valid=is_valid ) def get_position_ratio(self, price: float) -> float: """计算价格在箱体中的相对位置""" if self.height == 0: return 0.5 return (price - self.low) / self.height class ConsolidationBreakoutStrategy: """震荡识别与突破策略""" def __init__(self, capital: float = 100000, risk_per_trade: float = 0.02, lookback_period: int = 50): """ 初始化策略 Args: capital: 总资金 risk_per_trade: 单笔风险比例 lookback_period: 回溯周期 """ https://t.co/CclsZvqogq = capital self.risk_per_trade = risk_per_trade self.lookback_period = lookback_period # 核心参数 self.params = { # 震荡识别 'consolidation_threshold': 0.65, 'trend_threshold': 0.35, 'time_weight': 0.35, 'space_weight': 0.30, 'volatility_weight': 0.20, 'volume_weight': 0.15, # 区间交易 'top_threshold': 0.75, 'range_position_ratio': 0.5, 'safety_margin': 0.04, # 突破跟随 'breakout_threshold': 0.7, 'price_offset': 0.02, 'volume_multiplier': 1.5, 'persistence_bars': 3, # 回踩交易 'pullback_max_wait': 20, 'fib_low': 0.382, 'fib_high': 0.618, 'proximity_threshold': 0.03, } # 状态跟踪 self.current_state = MarketState.UNCERTAIN https://t.co/Hl1CpkP62f_structure: Optional[BoxStructure] = None self.trend_start_idx = None self.consolidation_start_idx = None self.breakout_info = None self.alpha = 0.75 # 保守策略资金占比 def calculate_technical_indicators(self, df: pd.DataFrame) -> pd.DataFrame: """计算技术指标""" df['EMA13'] = df['close'].ewm(span=13).mean() df['RSI'] = self._calculate_rsi(df['close'], 14) df['ATR'] = self._calculate_atr(df, 14) df['Volume_MA'] = df['volume'].rolling(20).mean() return df def _calculate_rsi(self, prices: pd.Series, period: int = 14) -> pd.Series: """计算RSI指标""" delta = prices.diff() gain = (delta.where(delta > 0, 0)).rolling(window=period).mean() loss = (-delta.where(delta < 0, 0)).rolling(window=period).mean() rs = gain / loss rsi = 100 - (100 / (1 + rs)) return rsi def _calculate_atr(self, df: pd.DataFrame, period: int) -> pd.Series: """计算ATR指标""" high_low = df['high'] - df['low'] high_close = np.abs(df['high'] - df['close'].shift()) low_close = np.abs(df['low'] - df['close'].shift()) tr = np.maximum(high_low, np.maximum(high_close, low_close)) return tr.rolling(period).mean() def evaluate_consolidation(self, df: pd.DataFrame, current_idx: int) -> ConsolidationMetrics: """评估震荡状态""" if current_idx < self.lookback_period: return ConsolidationMetrics(0, 0, 0, 0, 0, MarketState.UNCERTAIN) # 1. 时间维度评分 time_score = self._calculate_time_score(current_idx) # 2. 空间维度评分 space_score = self._calculate_space_score() # 3. 波动率维度评分 volatility_score = self._calculate_volatility_score(df, current_idx) # 4. 成交量维度评分 volume_score = self._calculate_volume_score(df, current_idx) # 综合评分 total_score = ( self.params['time_weight'] * time_score + self.params['space_weight'] * space_score + self.params['volatility_weight'] * volatility_score + self.params['volume_weight'] * volume_score ) # 状态判断 if total_score > self.params['consolidation_threshold']: market_state = MarketState.CONSOLIDATION elif total_score < self.params['trend_threshold']: market_state = MarketState.TREND_DOWN else: market_state = MarketState.UNCERTAIN return ConsolidationMetrics( time_score=time_score, space_score=space_score, volatility_score=volatility_score, volume_score=volume_score, total_score=total_score, market_state=market_state ) def _calculate_time_score(self, current_idx: int) -> float: """计算时间维度评分""" if not self.trend_start_idx or not self.consolidation_start_idx: return 0.2 trend_duration = self.consolidation_start_idx - self.trend_start_idx consolidation_duration = current_idx - self.consolidation_start_idx if trend_duration == 0: return 0.2 time_ratio = consolidation_duration / trend_duration if time_ratio < 0.5: return 0.2 elif time_ratio < 1.0: return 0.5 elif time_ratio < 2.0: return 0.8 else: return 1.0 def _calculate_space_score(self) -> float: """计算空间维度评分""" if not https://t.co/Hl1CpkP62f_structure or not https://t.co/Hl1CpkP62f_structure.is_valid: return 0.0 # 边界测试充分性 total_tests = https://t.co/Hl1CpkP62f_structure.upper_tests + https://t.co/Hl1CpkP62f_structure.lower_tests test_score = min(total_tests / 6, 1.0) # 箱体持续时间 duration_score = min(https://t.co/Hl1CpkP62f_structure.duration / 30, 1.0) return (test_score + duration_score) / 2 def _calculate_volatility_score(self, df: pd.DataFrame, current_idx: int) -> float: """计算波动率维度评分""" if current_idx < 40: return 0.0 # 当前波动率 current_atr = df.iloc[current_idx]['ATR'] # 历史波动率 if self.trend_start_idx and self.consolidation_start_idx: trend_atr = df.iloc[self.trend_start_idx:self.consolidation_start_idx]['ATR'].mean() else: trend_atr = df.iloc[current_idx-40:current_idx-20]['ATR'].mean() if trend_atr == 0: return 0.0 vol_ratio = current_atr / trend_atr if vol_ratio < 0.5: return 1.0 elif vol_ratio < 0.7: return 0.7 elif vol_ratio < 0.9: return 0.4 else: return 0.0 def _calculate_volume_score(self, df: pd.DataFrame, current_idx: int) -> float: """计算成交量维度评分""" if current_idx < 40 or not self.consolidation_start_idx: return 0.0 # 震荡期平均成交量 consolidation_vol = df.iloc[self.consolidation_start_idx:current_idx]['volume'].mean() # 趋势期平均成交量 if self.trend_start_idx: trend_vol = df.iloc[self.trend_start_idx:self.consolidation_start_idx]['volume'].mean() else: trend_vol = df.iloc[current_idx-40:current_idx-20]['volume'].mean() if trend_vol == 0: return 0.0 volume_decay = 1 - (consolidation_vol / trend_vol) return min(volume_decay * 2, 1.0) def update_box_structure(self, df: pd.DataFrame, current_idx: int): """更新箱体结构""" if current_idx < self.lookback_period: return window_data = df.iloc[current_idx-self.lookback_period:current_idx+1] https://t.co/Hl1CpkP62f_structure = BoxStructure.from_prices( window_data['high'].values, window_data['low'].values, window_data['close'].values, window=self.lookback_period ) def detect_top_reversal(self, df: pd.DataFrame, current_idx: int) -> bool: """检测顶部反转信号""" if current_idx < 1: return False current = df.iloc[current_idx] # 上影线比例 range_size = current['high'] - current['low'] if range_size == 0: return False upper_shadow = current['high'] - max(current['open'], current['close']) upper_shadow_ratio = upper_shadow / range_size # 综合条件 is_bearish = current['close'] < current['open'] below_ema = current['close'] < current['EMA13'] return upper_shadow_ratio > 0.4 and is_bearish and below_ema def generate_range_signal(self, df: pd.DataFrame, current_idx: int) -> Optional[Dict]: """生成区间交易信号""" if not https://t.co/Hl1CpkP62f_structure or not https://t.co/Hl1CpkP62f_structure.is_valid: return None current_price = df.iloc[current_idx]['close'] position_ratio = https://t.co/Hl1CpkP62f_structure.get_position_ratio(current_price) # 必须在顶部区域 if position_ratio < self.params['top_threshold']: return None # 检测反转信号 if not self.detect_top_reversal(df, current_idx): return None # RSI条件 rsi = df.iloc[current_idx]['RSI'] if rsi < 60: return None # 成交量条件 volume_ratio = df.iloc[current_idx]['volume'] / df.iloc[current_idx]['Volume_MA'] if volume_ratio > 0.9: return None # 计算交易参数 stop_loss = https://t.co/Hl1CpkP62f_structure.high * (1 + self.params['safety_margin']) position_size = self._calculate_position_size(current_price, stop_loss, 0.5) return { 'signal_type': 'RANGE_SHORT', 'entry_price': current_price, 'stop_loss': stop_loss, 'target1': https://t.co/Hl1CpkP62f_structure.level_050, 'target2': https://t.co/Hl1CpkP62f_structure.level_025, 'position_size': position_size, 'position_ratio': position_ratio, 'reason': f'区间顶部做空 (位置={position_ratio:.2%})' } def calculate_breakout_strength(self, df: pd.DataFrame, current_idx: int) -> float: """计算突破强度""" if not https://t.co/Hl1CpkP62f_structure or current_idx < 20: return 0.0 current_price = df.iloc[current_idx]['close'] # 价格突破深度 price_penetration = abs(https://t.co/Hl1CpkP62f_structure.low - current_price) / https://t.co/Hl1CpkP62f_structure.low price_score = min(price_penetration * 10, 1.0) # 成交量放大 vol_ratio = df.iloc[current_idx]['volume'] / df.iloc[current_idx]['Volume_MA'] volume_score = min(vol_ratio - 1, 1.0) # 持续性确认 persistence_count = 0 for i in range(min(self.params['persistence_bars'], current_idx)): if df.iloc[current_idx - i]['close'] < https://t.co/Hl1CpkP62f_structure.low: persistence_count += 1 else: break persistence_score = persistence_count / self.params['persistence_bars'] # 综合评分 return 0.4 * price_score + 0.3 * volume_score + 0.3 * persistence_score def generate_breakout_signal(self, df: pd.DataFrame, current_idx: int) -> Optional[Dict]: """生成突破信号""" if not https://t.co/Hl1CpkP62f_structure: return None current_price = df.iloc[current_idx]['close'] # 检查突破条件 price_break = current_price < https://t.co/Hl1CpkP62f_structure.low * (1 - self.params['price_offset']) strength = self.calculate_breakout_strength(df, current_idx) strong_enough = strength > self.params['breakout_threshold'] if not (price_break and strong_enough): return None # 记录突破信息 self.breakout_info = { 'timestamp': current_idx, 'price': current_price, 'lowest_after': current_price, 'strength': strength } # 生成信号 stop_loss = https://t.co/Hl1CpkP62f_structure.low * 1.02 position_size = self._calculate_position_size(current_price, stop_loss, 1.0) target = https://t.co/Hl1CpkP62f_structure.low - https://t.co/Hl1CpkP62f_structure.height * 2.0 return { 'signal_type': 'BREAKOUT_SHORT', 'entry_price': current_price, 'stop_loss': stop_loss, 'target1': target, 'target2': target * 0.9, 'position_size': position_size, 'breakout_strength': strength, 'reason': f'突破追空 (强度={strength:.2f})' } def generate_pullback_signal(self, df: pd.DataFrame, current_idx: int) -> Optional[Dict]: """生成回踩信号""" if not self.breakout_info: return None # 检查时间窗口 bars_since_breakout = current_idx - self.breakout_info['timestamp'] if bars_since_breakout > self.params['pullback_max_wait']: return None current_price = df.iloc[current_idx]['close'] # 计算回踩比例 lowest_after = self.breakout_info['lowest_after'] if https://t.co/Hl1CpkP62f_structure.low == lowest_after: return None pullback_ratio = (current_price - lowest_after) / (https://t.co/Hl1CpkP62f_structure.low - lowest_after) # 检查回踩区间 in_fib_range = (self.params['fib_low'] <= pullback_ratio <= self.params['fib_high']) near_resistance = (abs(current_price - https://t.co/Hl1CpkP62f_structure.low) < self.params['proximity_threshold'] * https://t.co/Hl1CpkP62f_structure.height) if not (in_fib_range and near_resistance): return None # 检测阻力受阻 current = df.iloc[current_idx] range_size = current['high'] - current['low'] if range_size > 0: upper_shadow = current['high'] - max(current['open'], current['close']) rejection = (upper_shadow / range_size > 0.4 and current['close'] < https://t.co/Hl1CpkP62f_structure.low) else: rejection = False if not rejection: return None # 生成信号 stop_loss = https://t.co/Hl1CpkP62f_structure.low * 1.015 position_size = self._calculate_position_size(current_price, stop_loss, 0.8) target = https://t.co/Hl1CpkP62f_structure.low - https://t.co/Hl1CpkP62f_structure.height * 1.5 return { 'signal_type': 'PULLBACK_SHORT', 'entry_price': current_price, 'stop_loss': stop_loss, 'target1': target, 'target2': target * 0.95, 'position_size': position_size, 'pullback_ratio': pullback_ratio, 'reason': f'回踩做空 (回踩={pullback_ratio:.2%})' } def _calculate_position_size(self, entry_price: float, stop_loss: float, multiplier: float = 1.0) -> float: """计算仓位大小""" risk_amount = https://t.co/CclsZvqogq * self.risk_per_trade stop_distance = abs(entry_price - stop_loss) if stop_distance == 0: return 0 base_position = risk_amount / stop_distance adjusted_position = base_position * multiplier # 仓位上限 max_position = (https://t.co/CclsZvqogq * 0.3) / entry_price return min(adjusted_position, max_position) def update_capital_allocation(self, consolidation_score: float): """更新资金分配""" self.alpha = 0.75 + 0.15 * (1 - consolidation_score) self.alpha = np.clip(self.alpha, 0.6, 0.9) def backtest(self, df: pd.DataFrame) -> Dict: """策略回测""" # 计算技术指标 df = self.calculate_technical_indicators(df) signals = [] state_history = [] for i in range(self.lookback_period, len(df)): # 更新箱体结构 self.update_box_structure(df, i) # 评估震荡状态 metrics = self.evaluate_consolidation(df, i) self.current_state = https://t.co/aYrw6Qe9xL_state # 记录状态 state_history.append({ 'timestamp': df.iloc[i].get('timestamp', i), 'price': df.iloc[i]['close'], 'state': self.current_state.value, 'consolidation_score': https://t.co/bneIHJbMXx_score, 'box_valid': https://t.co/Hl1CpkP62f_structure.is_valid if https://t.co/Hl1CpkP62f_structure else False }) # 更新资金分配 self.update_capital_allocation(https://t.co/bneIHJbMXx_score) # 生成交易信号 signal = None if self.current_state == MarketState.CONSOLIDATION: signal = self.generate_range_signal(df, i) elif self.current_state == MarketState.TREND_DOWN: signal = self.generate_breakout_signal(df, i) # 检查回踩机会 if not signal: signal = self.generate_pullback_signal(df, i) if signal: signal['timestamp'] = df.iloc[i].get('timestamp', i) signal['current_price'] = df.iloc[i]['close'] signal['market_state'] = self.current_state.value signal['alpha'] = self.alpha signals.append(signal) December 12, 2025
kling2.6は、環境音を生成できますがラップを歌うことができると聞いたので早速作ってみました💫
プロンプトはご自由にお使いください☺️
音声ON🔊で聞いてみてください。
▶️kling2.6プロンプト:
[Visuals]
(The character in the image:1.5) is rapping emotionally. Rhythmic head bobbing to the beat. Slight body movement. The character remains unchanged. Cinematic lighting.
[Audio]
Style: Dark Trap, Lo-fi Hip Hop, Heavy Bass.
Voice: Low-pitched male vocal, cool and whispery rap.
Lyrics:
"Walking through the neon rain,
Hiding scars and masking pain.
City lights, they burn so cold,
Another story left untold."
Negative Prompt:
(changing face:1.5), (changing art style:1.5), (redrawing character:1.5), different clothes, bright colors, 3d render, standard anime style
しっかりラップは歌えますね😍
しかし、リップシンクがすごい🥰 December 12, 2025
<ポストの表示について>
本サイトではXの利用規約に沿ってポストを表示させていただいております。ポストの非表示を希望される方はこちらのお問い合わせフォームまでご連絡下さい。こちらのデータはAPIでも販売しております。









