Stops and line based entry validation

 22/12/24    12:55pm

Now that the robot is buying and selling at relatively the right time, this morning has been about working on parameters for the minimum line difference setting.  This is what is being used to determine trend.  There are still a lot of small intermediate trades that I am trying to eliminate with this setting.  Initally starting at 0.00025 this has been increased greatly to 0.04 then 0.05 on the advice of the AI after feeding it the logs and trade results from all the tests.  A lot of small trades are still hitting stop loss early so working on that by implementing what you suggested - raising stops only after certain level of profit has been reached and by increasing the size of the trailing stop.  I know you said not to have a trailing stop but after discussion with the AI it said not having one was practically the same as just increasing the size of it so it doesn't interfere with trades but still has protection from rare catastrophic deviations in price.  And we can just keep increasing the size until it feels comfortable.  Let me know what you think.

4:32 pm

Ok, so these are the modifications to the stops:

StopLoss widened to 350 points for initial position
TrailingPoints set to 350 points for wider trailing distance
Added TrailingThreshold (200 points) before trailing begins
Added TrailingStep (100 points) to avoid small trailing stop movements
Only moves trailing stop in TrailingStep increments

Which didn't make much of a difference so added a parameter for time after lines crossed. To enter trade only after a certain time since lines crossed:

Require the lines to stay crossed for MinCrossedBars bars before trading
Log detailed information about the line positions
Help prevent false signals from quick crossovers

So will do some testing with these parameters and also will investigate the efficacy of the minLineDifference parameter to see if it is actually being used properly.  I'm suspicious since I set it to 50 and it still made all the small intermediary trades.  Theoretically it should have prevented most of them but didn't do jack.  Will see how it goes.

5:48 pm
Turns out the minLineDifference parameter was in fact working just fine but the initial value was far below anything that would have an effect at 0.00025 and I took it up to 0.05 with minimal effect also.  I took it up to 1, then 10, then 50 to give it extreme examples which I thought would just shut it off but instead the readings were just unusable and it had to be within that smaller range.  So I set it to 0.09 and bam, decent profits.  I took it down a notch again to 0.08 and with $1 lots it came out at $10349 profit.  Pretty awesome.So now I'll do some optimisation tests on that range to find the most profitable setting.

I did add the parameter to only enter a trade after lines cross for a certain amount of time but I haven't switched it on yet since I'm still testing the range of the minLineDifference parameter.

6:09 pm
Wow, after optimisation on that one parameter, minLineDifference, the sweet spot came out at approximately 0.0685 ('approximately' because the three values above and below it all came out the same so I took the middle value) and made a profit of $1359.96 with a lot size of $1, going from $10000 to $11359.96.  An increase of 13.6%.... I think we're on the right track.

10:32 pm
Just got home and checked the last test which was a year long test.  Came out at a profit of around 11 hundredish, not great really since it made more than that over the month and a half or so I was testing for before.  Had a good look at the data and there are periods where strange trades are happening which are causing these large losses that prevent it from climbing.  I see a bunch right at the end where there are clusters of sells where there should be one single large buy.  Obviously more to investigate on the foundational level.

Comments

Popular posts from this blog

Momentum

Strip back to core functionality