order flow WIP, chart broken

This commit is contained in:
Dobromir Popov
2025-06-18 13:51:08 +03:00
parent 5bce17a21a
commit e238ce374b
16 changed files with 1768 additions and 1333 deletions

View File

@ -959,8 +959,8 @@ class WilliamsMarketStructure:
logger.info(f"CNN Training with X_shape: {X_train_batch.shape}, y_shape: {y_train_batch.shape}")
# Perform a single step of training (online learning)
# Use minimal callbacks for online learning, or allow configuration
self.cnn_model.model.fit(X_train_batch, y_train_batch, batch_size=1, epochs=1, verbose=0, callbacks=[])
# Use the wrapper's fit method, not the model's directly
self.cnn_model.fit(X_train_batch, y_train_batch, batch_size=1, epochs=1, verbose=0, callbacks=[])
logger.info(f"CNN online training step completed for pivot at index {self.previous_pivot_details_for_cnn['pivot'].index}.")
else:
logger.warning("CNN Training: Skipping due to invalid X_train or y_train.")
@ -999,7 +999,7 @@ class WilliamsMarketStructure:
final_pred_class = pred_class[0] if isinstance(pred_class, np.ndarray) and pred_class.ndim > 0 else pred_class
final_pred_proba = pred_proba[0] if isinstance(pred_proba, np.ndarray) and pred_proba.ndim > 0 else pred_proba
logger.info(f"CNN Prediction for pivot after index {newly_identified_pivot.index}: Class={final_pred_class}, Proba/Val={final_pred_proba}")
logger.info(f"CNN Prediction for pivot after index {newly_identified_pivot.index} (of {X_predict.size}): Class={final_pred_class}, Proba/Val={final_pred_proba}")
# Store the features (X_predict) and the pivot (newly_identified_pivot) itself for the next training cycle
self.previous_pivot_details_for_cnn = {'features': X_predict, 'pivot': newly_identified_pivot}