
    hBjP                     J    d dl mZ d dlmZmZmZ d Zd Zd Zd Z	d Z
d Zd	S )
    )Decimal)MarketContextbuild_v76_order_intentstrict_anti_chase_blockersc                     t          ddt          d          t          d          t          d          t          d          t          d          dd	t          d
          t          d                    } t          | d          }|J |j        dk    sJ |j        dk    sJ |j        J |j        t          d          k    sJ d S )NBTCBTC/USDC:USDC100000998009975099500	100000000      99000500)coinsymbolcurrent_pricerecent_highsma_fastsma_slow
volume_24hbreadth_positive_candidatesrelative_strength_rankbaseline_pricewallet_equity_usdcz	v76-BTC-1client_order_idconfirmed_squeeze_breakoutz1.25)r   r   r   r   reason	stop_lossrisk_usdcontextintents     -tests/test_v76_hl_confirmed_squeeze_hybrid.py=test_v76_strategy_returns_order_intent_without_exchange_callsr(      s    h''G$$!!!!;''$% w''"5>>  G $G[IIIF;%=88888'''?gfoo------    c                     t          ddt          d          t          d          t          d          t          d          t          d          dd	t          d
          t          d          d          } t          | d          J d S )NWLDzWLD/USDC:USDCz2.00z1.98z1.99z1.95r   r   r   z1.90r   T)r   r   r   r   r   r   r   r   r   r   r   coin_leakage_blockedz	v76-WLD-1r   )r   r   r   )r%   s    r'   6test_v76_strategy_rejects_wld_when_leakage_gate_blocksr-      s    fooFOO;''$% v"5>>!  G "';GGGOOOOOr)   c                     t          d&i dddddt          d          dt          d          d	t          d
          dt          d          dt          d          dddddt          d          dt          d          dddt          d          dt          d          dt          d          dt          d           d!t          d"          } t          |           }d#|v sJ t          | d$%          J d S )'Nr   r   r   r	   r   z104.50r   z104.40r   z103.90r   z102.80r   r   r   r   r   r   r   100r   r   strict_anti_chaseT
retest_lowz103.10atr_pct1.20move_15m_pctz2.40move_1h_pctz4.00pullback_from_high_pctz0.05!anti_chase_overextended_no_retestzv76-BTC-chaser    r   r   r   r   r%   blockerss     r'   8test_v76_strict_anti_chase_blocks_overextended_no_retestr<   1   sw      U h''' H%%%	
 """ """ ;''' %&A  !q u~~~ #5>>> $ 8$$$  V___  FOOO!"  'v#G( *'22H.(::::!'?KKKSSSSSr)   c                  &   t          d&i dddddt          d          dt          d          d	t          d
          dt          d          dt          d          dddddt          d          dt          d          dddt          d          dt          d          dt          d          dt          d           d!t          d"          } t          |           g k    sJ t          | d#$          }|J |j        d%k    sJ d S )'Nr   r   r   r	   r   r/   r   101r   99.80r   99.20r   r   r   r   r   r   r   100.50r   r   r0   Tr1   99.30r2   r3   r4   0.30r5   0.90r6   0.99zv76-BTC-retestr   survival_rebound_sma_reclaimr8   )r   r   r   r   r!   r$   s     r'   0test_v76_strict_anti_chase_allows_retest_reclaimrG   L   s      U ennn ENNN	
 !!! !!! ;''' %&A  !q x((( #5>>> $ 7###  V___  FOOO!"  'v#G( &g.."4444#G=MNNNF=:::::::r)   c                     t          d/i dddddt          d          dt          d          d	t          d
          dt          d          dt          d          dddddt          d          dt          d          dddt          d          dt          d          dt          d          dt          d           d!t          d"          d#t          d$          d%t          d&          d't          d(          } t          |           }d)|v sJ d*|v sJ d+|v sJ d,|v sJ t          | d-.          J d S )0Nr   r   r   r	   r   105r   106r   104r   103r   r   r   r   r   r   r   r/   r   r   r0   Tr1   z103.50r2   z1.0r4   z2.7r5   z4.0r6   z0.95vwap_distance_pctz1.35upper_wick_pctz0.80candle_body_pctrC   !anti_chase_vwap_distance_too_highanti_chase_atr_pumpanti_chase_upper_wick_rejectionanti_chase_exhaustion_candlezv76-BTC-exhaustionr   r8   r9   r:   s     r'   ?test_v76_strict_anti_chase_blocks_vwap_pump_and_wick_exhaustionrT   g   s      U ennn ENNN	
   ;''' %&A  !q u~~~ #5>>> $ 8$$$  U^^^  ENNN!"  'v#$ "&///%& v'(  )G. *'22H.(:::: H,,,,,8888)X5555!';OPPPXXXXXr)   c                  t   t          d-i dddddt          d          dt          d          d	t          d
          dt          d          dt          d          dddddt          d          dt          d          dddt          d          dt          d          dt          d          dt          d           d!t          d"          d#t          d$          d%t          d&          d't          d(          } t          |           }d)|v sJ d*|v sJ t          | d+,          J d S ).Nr   ETHr   zETH/USDC:USDCr   r/   r   r>   r   r?   r   r@   r   r   r   r   r   r   r   rA   r   r   r0   Tr1   rB   r2   r3   r4   rC   r5   rD   r6   rE   funding_rate_hourly_pctz0.006open_interest_change_pct14premium_pctz0.12anti_chase_oi_funding_crowdedanti_chase_premium_too_highzv76-ETH-crowdedr   r8   r9   r:   s     r'   ;test_v76_strict_anti_chase_blocks_real_derivatives_crowdingr]      s      U ennn ENNN	
 !!! !!! ;''' %&A  !q x((( #5>>> $ 7###  V___  FOOO!"  'v#$ !( 0 0 0%& ")'( FOOO)G. *'22H*h6666(H4444!';LMMMUUUUUr)   N)decimalr   .src.strategies.v76_hl_confirmed_squeeze_hybridr   r   r   r(   r-   r<   rG   rT   r]   r8   r)   r'   <module>r`      s          | | | | | | | | | |. . .0P P P&T T T6; ; ;6Y Y YBV V V V Vr)   