08-26-2018, 08:07 PM
(08-26-2018, 06:58 PM)martyc Wrote: Can someone confirm the logic for me please?Currently looking at two 'improvements'?
I've just been watching the logs and tradingview as the price has been changing. SMA long went under SMA short about 90 minutes so am in BEAR mode with RSI range (58-10). RSI pops up to 61 for a single 5 minute tick and the logs then show it start to try and sell. All good so far.
Not able to sell as the the price is starting to fall, puts in a cancel, looks at the order book and puts in a new sell at a new lower price. At this stage the RSI is now back under 58. Still not able to sell, issues another cancle and puts in a third sell at again a lower price.
Q1. Am I understanding this correctly?
Q2. Is this expected behaviour?
Q3. Is it possible to change the code so that if it is unable to sell an then issues a cancel, it first checks is the decision to sell still valid before it reissues the sell at a lower price?
Cheers
Some sort of whipsaw prevention where it will use Math.min(maSlow,maFast)/Math.max(maSlow,maFast) to make sure that we are not in the process of crossing from BULL to BEAR or vice versa. If the ratio is 0.997 or greater then do nothing until next tick.
Check the volume before selling. I see a number of instances where I have bought in a BULL and then it changes to a BEAR and then pops above the bear high for 1 tick on minimal volume and I get sold out. Some sort of check of the volume may work.