Bull trend riding RSI take profit - Printable Version +- Gekko Forum (https://forum.gekko.wizb.it) +-- Forum: Gekko (https://forum.gekko.wizb.it/forum-13.html) +--- Forum: Strategy Development (https://forum.gekko.wizb.it/forum-12.html) +--- Thread: Bull trend riding RSI take profit (/thread-57851.html) |
Bull trend riding RSI take profit - Shrike998 - 02-05-2019 Could someone help me to work out this code.. ? Code: // Sell when RSI > 75 - want to change to allow for riding bull trends properly. - watch rsi each candle after 75 and sell when it starts dropping again. I want to trigger it when the RSI hits 75, to check every candle and see if the RSI is higher or lower than the last candle, if its higher, do nothing, if its lower, sell. Any one help me work out how to do this? Im pretty new to code.. Thanks! RE: Bull trend riding RSI take profit - Jupiterix - 04-23-2019 interesting, I follow. RE: Bull trend riding RSI take profit - Gryphon - 04-25-2019 You need to keep track of the previous candles RSI and compare the latest data to it. In the init function declare a variable to hold the previous RSI - Code: this.prevRsi = 0; Then in the check function with your trade logic: Code: if(RSI >= 75){ //Have you passed your sell threshold? |