-
Notifications
You must be signed in to change notification settings - Fork 2k
Conversation
Reversing RSI Buy / Sell logic to correctly Buy when RSI drops below lower indicator, and Sell when it rises above upper indicator.
+1 |
I'm getting this error using
|
I have been getting that error using Sim the entire time.
I have a ticket for it submitted sometime last week.
I assume it's unrelated to this file.
…On Jan 30, 2017 5:44 PM, "cbassols" ***@***.***> wrote:
I'm getting this error using ./zenbot sim in your version of
default_logic.js
/zenbot/node_modules/numbro/numbro.js:1111
var parts = x.toString().split('.');
^
TypeError: Cannot read property 'toString' of undefined
at multiplier (/zenbot/node_modules/numbro/numbro.js:1111:22)
at /zenbot/node_modules/numbro/numbro.js:1127:22
at Array.reduce (native)
at correctionFactor (/zenbot/node_modules/numbro/numbro.js:1125:21)
at Numbro.subtract (/zenbot/node_modules/numbro/numbro.js:1207:47)
at first_run (/zenbot/default_logic_v2.js:441:169)
at Immediate.doNext (/zenbot/node_modules/zenbrain/utils/apply_funcs.js:10:12)
at runCallback (timers.js:651:20)
at tryOnImmediate (timers.js:624:5)
at processImmediate [as _immediateCallback] (timers.js:596:5)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#106 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AJqpecQYCxzabD-49ogR-gWALOTyAjT6ks5rXpH6gaJpZM4LrrsQ>
.
|
For a stop-loss protection, the current way of selling when it starts to go down is a pretty good idea. |
RSI indicates when something is undersold or oversold. When oversold (low RSI), it means the price has momentum to continue upwards. If it's overbought (high RSI) then the price has momentum to move downwards. It does look like default_logic.js has the bot doing the exact opposite. |
it's definitely related to the file. Swapping trend Lines 354 and 357 fixed the issue. Line 354 |
Hi, sorry I was away from Zenbot for so long and never merged this. I've been working on Zenbot 4 and just tagged the release last night. The RSI being backwards was a quirk I was aware of, but since the simulations were better that way, I went with it. 4.x is now using an EMA-based approach. Closing this PR since 3.x won't be supported anymore. Thanks for using Zenbot! |
Reversing RSI Buy / Sell logic to correctly Buy when RSI drops below lower indicator, and Sell when it rises above upper indicator.
Per Issue: #102