Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ZiadFrancis/ReinforcementTrading_Part_1
/ functions
Functions
22 in github.com/ZiadFrancis/ReinforcementTrading_Part_1
⨍
Functions
22
◇
Types & classes
1
↓ 9 callers
Method
_close_position
(self, reason: str, exit_price: float)
trading_env.py:264
↓ 4 callers
Function
evaluate_model
(model: PPO, eval_env: DummyVecEnv, deterministic: bool = True)
train_agent.py:13
↓ 3 callers
Method
_get_observation
(self)
trading_env.py:194
↓ 2 callers
Method
_compute_unrealized_pips
(self)
trading_env.py:176
↓ 2 callers
Method
_open_position
(self, direction: int, sl_pips: float, tp_pips: float)
trading_env.py:232
↓ 2 callers
Method
_reset_state
(self)
trading_env.py:146
↓ 2 callers
Method
_sample_slippage_pips
(self)
trading_env.py:223
↓ 2 callers
Function
load_and_preprocess_data
Loads EURUSD data from CSV and preprocesses it by adding RELATIVE technical features. CSV expected columns: [Time (EET), Open, High, Low, Cl
indicators.py:5
↓ 2 callers
Method
reset
(self, seed=None, options=None)
trading_env.py:348
↓ 2 callers
Method
step
(self, action: int)
trading_env.py:373
↓ 1 callers
Method
_apply_optional_normalization
(self, obs: np.ndarray)
trading_env.py:186
↓ 1 callers
Method
_check_sl_tp_intrabar_and_maybe_close
Checks SL/TP on the *next bar* range [Low, High]. Conservative rule if both touched: assume SL hits first (worst case). Retur
trading_env.py:304
↓ 1 callers
Method
_cost_pips_round_trip
(self)
trading_env.py:228
↓ 1 callers
Method
_get_state_features
(self)
trading_env.py:168
↓ 1 callers
Function
main
()
train_agent.py:41
↓ 1 callers
Function
main
()
test_agent.py:40
↓ 1 callers
Function
run_one_episode
(model, vec_env, deterministic=True)
test_agent.py:12
Method
__init__
( self, df, window_size: int = 30, sl_options=None, tp_options=None,
trading_env.py:40
Function
make_test_eval_env
()
train_agent.py:99
Function
make_train_env
()
train_agent.py:60
Function
make_train_eval_env
()
train_agent.py:80
Method
render
(self)
trading_env.py:478