SyBrain icon indicating copy to clipboard operation
SyBrain copied to clipboard

Very good performance, except it is backwards

Open vmajor opened this issue 6 years ago • 2 comments

SyBrain now happily runs and trades, but it loses money with basically every trade. This is terrible, except it is so consistent that if you reverse the logic it would be making quite a good profit.

Could you release a version with reversed trading logic?

vmajor avatar Jan 06 '20 16:01 vmajor

@vmajor If you simply swap the if conditions, then it will be reverse trading logic. Here the swapped one

print("Sell Side: %s - Buy Side: %s" % (str(obk_sell_cum), str(obk_buy_cum)))

if direction == 0 and obk_sell_cum > obk_buy_cum * 10: print("Go Buy !") return obk[0]['bids'][1][0] if direction == 1 and obk_buy_cum > obk_sell_cum * 10: print("Go Sell !") return obk[0]['asks'][1][0]

bhageshvar avatar Feb 16 '20 10:02 bhageshvar

I would do something like that :

               `if fP_var_value_av > 0 and fairPrice_var_actual > fP_var_value_av * 2 and p_verdict > 0:
                    sell_departure = check_order_book(0)
                    if sell_departure != 0:
                        results = fire_sell(sell_departure)
                        if results == 0:
                            print("Resetting...")
                        else:
                            print("Total Balance:", str(results))
                        if results != 0:
                            pos_taken += 1
                        tick_ok = False
                        tick_count = 0
                if fP_var_value_av < 0 and fairPrice_var_actual < fP_var_value_av * 2 and p_verdict < 0:
                    buy_departure = check_order_book(1)
                    if buy_departure != 0:
                        results = fire_buy(buy_departure)`

5ymph0en1x avatar Feb 18 '20 22:02 5ymph0en1x