buy/hold keyword exec stack handling

This commit is contained in:
Rowan Torbitzky-Lane 2025-03-14 00:54:13 -05:00
parent 617b03aeb6
commit 616b33fe20

View File

@ -11,6 +11,11 @@
instruction (first (:exec state)) instruction (first (:exec state))
literal-type (instructions/get-literal-type instruction)] ; nil for non-literals literal-type (instructions/get-literal-type instruction)] ; nil for non-literals
(cond (cond
;;
;; Catch the trading signal keywords before the other
;; keyword checks.
(some #(= instruction %) '(:buy :sell :hold))
(state/push-to-stack popped-state :signal instruction)
;; ;;
;; Recognize functional instruction or input instruction ;; Recognize functional instruction or input instruction
(keyword? instruction) (keyword? instruction)