VmaPredict2.js (new) - 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: VmaPredict2.js (new) (/thread-58001.html) |
RE: VmaPredict2.js (new) - QueefWellington - 09-16-2019 (09-16-2019, 06:30 PM)PGTART Wrote:(09-16-2019, 06:08 PM)QueefWellington Wrote:(09-16-2019, 06:04 PM)PGTART Wrote:(09-16-2019, 05:48 PM)QueefWellington Wrote: Just having a look at this. I've only ever used current candle for percentages. But smoothing it out with like 5 candles sounds like a good idea. Never thought of it. RE: VmaPredict2.js (new) - anon.e.mous - 09-17-2019 (09-16-2019, 04:35 PM)PGTART Wrote: I think for shorter time ranges I know the values must be smaller. The TOML configurations that I've posted are for 1 hour candles only. But since this variables are based in value and not in percentage it is difficult to find the sweet spot. RE: VmaPredict2.js (new) - PGTART - 09-17-2019 Update I decided to release an intermedium version 6B 6B can still behave like 6 However, as i don't wanted this version to fragment in other forked versions here. So I decided to release a version that can handle percentages, earlier before the other future's i have planed Magica, MediumOut, ShortSight, and HighShot as well. Can now use a percentage with a new toml and code file, in the toml I have now the option: UsePercentage = true If set to true then those 4 variables take a percentage of the long moving average (which makes most sense I believe, in the kind of math i use). In this case 100% equals 1, so for example 5% equals 0.05 (But since BTC is so high maybe you like to test 0.005 .. percetage as a fraction. if you set: UsePercentage = false Then the old behavior is used, using fixed constants From you i requesting how this works out, (post your results and toml settings, so that i can improve it more). Might be interesting for alt markets i think, and i have not tested it on that so far, so i am curious how it behaves in low priced coins. You'll find 6B version here : https://github.com/PGTBoos/GekkoStrategies I release it a bit early as, wel tomorrow I start at a new job so (I coded this while i had no job). After today new release will appear less frequent, i will not have that much time left then. So a neural network improved version 20 is not to be realeased anytime soon now (one day i will use tensor flow) with js. An important note though, I really depend on you people testing this out. Doing coding and good market testing takes a lot of time, and doing it all would reduce my coding speed a lot. I rather focus on math, statistics coding, algorithmic trading, so please, please please... So share your result, so I can improve upon it, and others might improve upon you as well. I spend about a week coding this for free, so don't hesitate to join the development of code by testing it. RE: VmaPredict2.js (new) - QueefWellington - 09-17-2019 (09-17-2019, 02:01 PM)PGTART Wrote: [size=large][color=#993399] So what is it a percentage of? So when you say "100% = 1" 1 what? Wouldn't it make more sense for it to be the actual percentage of the price? So for example if you set it to 10 it's 10% of the price? RE: VmaPredict2.js (new) - PGTART - 09-17-2019 (09-17-2019, 07:12 PM)QueefWellington Wrote:(09-17-2019, 02:01 PM)PGTART Wrote: [size=large][color=#993399] 100% = 1 25% = 0.25 1% =0.01 I've always found it easier to use percentages this way..it is a percentage of the long moving average. The long moving average is the average price of a coin over x days its under PeriodAverage in the toml file So its not the current candle (thats not ideal for my math, that tries to find anomalies). RE: VmaPredict2.js (new) - QueefWellington - 09-17-2019 (09-17-2019, 08:11 PM)PGTART Wrote:(09-17-2019, 07:12 PM)QueefWellington Wrote:(09-17-2019, 02:01 PM)PGTART Wrote: [size=large][color=#993399] So if you wanted to set magica to 10% of the long ma you would set magica to 0.1 in toml? Your code then does: this.Toml.Magica = this.settings.Swings.Magica * maLong; I might be being pedantic, but isn't that a fraction? RE: VmaPredict2.js (new) - PGTART - 09-17-2019 Uh Oh i Its candy day !!!, found a small typo bug in 6B, so I released 6C !! And because its candy day it has a new rule as well ! Oh well had it in the back of my mind for a while, and wanted to see how you people might make use of it. Its in the Toml under RSISafety. RSI safety is intended to get out earlier before (a deep downhill fall happens). Idealy negative Downhills are to be avoided (but some will happen, there will be times of losses as well). A simple typical RSI trader would for example sell based upon RSI >70% (thats 0.7 in the toml). This new RSISafety is a short protection, and will sell if RSISHort > 0.xx However it will not trigger if the current candle is below the price we bought the last time. Thus theoretically it should be possitive, but there is always the uncertanty of the future..) only the DownHill rule will sell (by a statical predicted next candle) below the bought price, intended to minimize loozes. The way the Magica rule works, made it also buying on flat side trend markets (often falling low later). I was quite a while looking for a way around it, Magica is still the same rule But it has extended logica now, it will not buy based upon the toml tresholt RSIWait, if RSI is higher no buy is done. for example if you want it to act on < 50% (then RSIWait = 0.5 in the toml) Magica wont buy, if the rsi is value above RSIWait (buy protection). RSIcandles is just the standard over how many candles RSI is calculated. RSI traders often use values as 20% or 50%, 70% or so, but I do not use soley RSI to trade, i use it for protection only. So now the Magica rule has some protection of the RSI indicator (besides its other complex logica) (dont about the other logic that answer is in the code). The provided TOML for 6C is not at all optimal, and I await you people's results. The TOML is just what i used in debugging and validating the code and math. Ideally HighShot and RSIShort might together scalp short small waves, resulting in a Magica buy next I do realize its not a simple strategy with a few TOML variables, sorry for that. Please also understand that logic improvements require your testing results to be posted here as well. Note if RSIShort sell does not workout (there is a chance for that, set it to 2 or so), (might inflict with highshot wrongly also). i'm awaiting your results Also RSIWait can be set to 2 to disable it (so you can first fine tune al other settings before you tryout that RSI protection). RE: VmaPredict2.js (new) - ortu - 09-20-2019 No trades for me in backtest.....any idea? RE: VmaPredict2.js (new) - PGTART - 09-20-2019 (09-20-2019, 08:35 AM)ortu Wrote: No trades for me in backtest.....any idea?Alter the toml file it was not optimized I await testers here to do that RE: VmaPredict2.js (new) - trackers - 09-22-2019 FYI there's a spelling mistake in 6B - 'malong' instead of 'maLong' on line 277 |