Gekko Forum
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)

Pages: 1 2 3 4 5 6 7


RE: VmaPredict2.js (new) - PGTART - 09-16-2019

Oops forgot the hit the commit button on Github Smile
It now there where it is usual: https://github.com/PGTBoos/GekkoStrategies


RE: VmaPredict2.js (new) - anon.e.mous - 09-16-2019

(09-16-2019, 01:06 PM)PGTART Wrote: Oops forgot the hit the commit button on Github  Smile
It now there where it is usual: https://github.com/PGTBoos/GekkoStrategies

You have an issue with the JS file. Your comments in the beginning are with # instead of // this causes an error and gekko doesnt run the strategy Smile


RE: VmaPredict2.js (new) - anon.e.mous - 09-16-2019

Well.... testing the version 6 with one hour candles... 


TOML:

[Swings]  # where is store my own constants

# magica       = used in long buy price dips
# mediumout = used in short sell
# shortsight   = used in short sell

Magica = 325
MediumOut = 280
ShortSight = 400

# downhill = short after price drop since highest
# highshot = short after price jump 2 new candles
# bullseye = secure profit since bought
# daystop = max los stops trade till next day

DownHill = 250 
HighShot = 290  
BullsEye = 1000    
DayStop = 300     


[ForcastTrend] 
#forcast trend tulip indicator

Short =  6 
Medium = 12
Long = 100   #nan


[PeriodAverage] 
#moving averages
Short = 6 
Medium = 25
Long = 100

[VolumePeriodAverage]
 #volume moving averages  

Short  = 6    #not used
Medium = 30  
Long   = 100  #not used

This resulted in 
simulated profit: 258.50833%
When market was 172.74404%

I was trying to test with smaller candles (1 and 5 min) but never found a way to have a positive result. Need to test more.


RE: VmaPredict2.js (new) - PGTART - 09-16-2019

I think for shorter time ranges
The red values are based on trade profits losses so those might require to be a bit smaller :
The green values are used in averaging, so say 20  minute trades, if one does the averages x3 (then they still contain a hour of data).
It should be possible i think there is nothing limiting this math not to work on other time ranges.
And if it works for one range it should thus also work on another range (math is universal), but it will have different tweak settings.

ea Magica moments might be a bit smaller because in smaller timeranges the gain profit (per candle) is statistically smaller as compared to one hour profit  (however since more candle's pass by there is a chance to take more opertunities in the 5 min range).

sorry for my typo of using # instead of // on top of the js file   (misstake used toml style comment).

TOML:

[Swings]  # where is store my own constants

# magica       = used in long buy price dips
# mediumout = used in short sell
# shortsight   = used in short sell

Magica = 325
MediumOut = 280
ShortSight = 400

# downhill = short after price drop since highest
# highshot = short after price jump 2 new candles
# bullseye = secure profit since bought
# daystop = max los stops trade till next day

DownHill = 250 
HighShot = 290  
BullsEye = 1000    
DayStop = 300     



[ForcastTrend] 
#forcast trend tulip indicator

Short =  6 
Medium = 12
Long = 100   #nan


[PeriodAverage] 
#moving averages
Short = 6 
Medium = 25
Long = 100

[VolumePeriodAverage]
 #volume moving averages  

Short  = 6    #not used
Medium = 30  
Long   = 100  #not used


This resulted in 
simulated profit: 258.50833%
When market was 172.74404%

I was trying to test with smaller candles (1 and 5 min) but never found a way to have a positive result. Need to test more.


RE: VmaPredict2.js (new) - Stixx - 09-16-2019

Thanks for sharing I will be testing this baby out. If you trade with 1 hour candles and the market suddenly drops do you have protection from that? Sorry still a newbie to gekko and trading.


RE: VmaPredict2.js (new) - PGTART - 09-16-2019

(09-16-2019, 05:26 PM)Stixx Wrote: Thanks for sharing I will be testing this baby out. If you trade with 1 hour candles and the market suddenly drops do you have protection from that? Sorry still a newbie to gekko and trading.

2 kinds of protection but they are not fixed strict  can fall deeper as well
Downhill (since last high) daystop (stops trading till next day).


RE: VmaPredict2.js (new) - QueefWellington - 09-16-2019

Just having a look at this.

Correct me if I'm wrong but magica is used to compare with the actual close price right? So your default magica value of 380 is of whatever currency you are trading? This means that those values will have to be drastically different for another currency pair. Also if you ran the bot for a long time, your magica value might be good at the start but after a couple of months, it will no longer be optimal because the price could me much high/lower.

It may be better to do these as percentages of the actual price rather than absolute values. That way the effectiveness of the value won't change over time and can be applied to other pairs.

But apart from that, it looks good Smile


RE: VmaPredict2.js (new) - PGTART - 09-16-2019

(09-16-2019, 05:48 PM)QueefWellington Wrote: Just having a look at this.

Correct me if I'm wrong but magica is used to compare with the actual close price right? So your default magica value of 380 is of whatever currency you are trading? This means that those values will have to be drastically different for another currency pair. Also if you ran the bot for a long time, your magica value might be good at the start but after a couple of months, it will no longer be optimal because the price could me much high/lower.

It may be better to do these as percentages of the actual price rather than absolute values. That way the effectiveness of the value won't change over time and can be applied to other pairs.

But apart from that, it looks good Smile

Percentages is the next future plan v7 or v8, any way soon, its easier for debugging to use fixed amounts.
But it will come  for sure

There are 2 buying rules and 3 or 4 sell rules btw  (depends sometimes i think of something new) whenever a rule aplies it happens to the situation.
The rules dont change that much btw but if i can find something to sell for a deep trend dive i'll add it
Its basically a harmony of rules that make it work well, ea a good mixture, instead of a single rule.
 
frequent trading thus is also a way to have chance multiple strategies


RE: VmaPredict2.js (new) - QueefWellington - 09-16-2019

(09-16-2019, 06:04 PM)PGTART Wrote:
(09-16-2019, 05:48 PM)QueefWellington Wrote: Just having a look at this.

Correct me if I'm wrong but magica is used to compare with the actual close price right? So your default magica value of 380 is of whatever currency you are trading? This means that those values will have to be drastically different for another currency pair. Also if you ran the bot for a long time, your magica value might be good at the start but after a couple of months, it will no longer be optimal because the price could me much high/lower.

It may be better to do these as percentages of the actual price rather than absolute values. That way the effectiveness of the value won't change over time and can be applied to other pairs.

But apart from that, it looks good Smile

Percentages is the next future plan v7 or v8, any way soon, its easier for debugging to use fixed amounts.
But it will come  for sure

Sounds good pal. Just adding percentages in myself now because It's easier than setting values like 0.00001 Big Grin


RE: VmaPredict2.js (new) - PGTART - 09-16-2019

(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.

Correct me if I'm wrong but magica is used to compare with the actual close price right? So your default magica value of 380 is of whatever currency you are trading? This means that those values will have to be drastically different for another currency pair. Also if you ran the bot for a long time, your magica value might be good at the start but after a couple of months, it will no longer be optimal because the price could me much high/lower.

It may be better to do these as percentages of the actual price rather than absolute values. That way the effectiveness of the value won't change over time and can be applied to other pairs.

But apart from that, it looks good Smile

Percentages is the next future plan v7 or v8, any way soon, its easier for debugging to use fixed amounts.
But it will come  for sure

Sounds good pal. Just adding percentages in myself now because It's easier than setting values like 0.00001 Big Grin

Do you prefer trading on long average percentages or based upon current candle?
I kinda wonder if current candle might influence to much.