patched early order

This commit is contained in:
Taha Afzal committed 2022-12-20 12:22:24 -05:00
1 parent afefaa36d1
commit e6d845f970
1 file changed
+5
@@ -844,6 +844,11 @@ void MomentumAlgo::_early_brick() {
bool buy_signal = new_high_avg.has_value()
? new_high_brick.value().high >= new_high_price
: false;
if (me->algo_params->reverse_logic) {
auto temp = buy_signal;
buy_signal = sell_signal;
sell_signal = temp;
}
if (buy_signal || sell_signal) {
double n_p = me->curr_price.value();
if (me->curr_pos == 0) {