binary-com / binary-bot

Visual automation for binary.com
binary-bot.binary.sx
MIT License
231 stars 523 forks source link

Trend Lines Strategy #558

Closed binary-ex-machina closed 6 years ago

binary-ex-machina commented 6 years ago

Well guys, i'm posting this strategy here and maybe with your help, we can find if its good and the best values and markets for this.

It checks the EMA9 with 1hr candles and see if the last tick is above or below on each trade, to find the barrier sign.

After defining the barrier, on the watch block. If the tick is higher then the upperTrendLine + 1, it breaks the resistance level, so the bot assumes that it will go up. The same for the lowerTrendLine -1 when it breaks the support level and go down.

It have a nice calculation and in my tests I got the values correctly. My problem with this is the candle time, EMA value, Duration and the period of each trendline. Along with this ideia, this strategy will sell at market when the duration of the trade is more then 50min (3000 seconds), is positive and didn't hit the barriers. If you change the duration, change this number to 80-85% of the duration (in seconds)

The config below is the best one yet in my tests. No martingale.

Can you guys try with other configurations and see if this is a good one?

image

trendline v7.xml.zip

nramade commented 6 years ago

i am in lets try and see :)

CJAsmar commented 6 years ago

I'm testing as well

davi9411 commented 6 years ago

testing

binary-ex-machina commented 6 years ago

@laxracorp https://www.thebalance.com/how-to-effectively-use-trendlines-in-your-trading-1030884

binary-ex-machina commented 6 years ago

Results so far. I'm targeting $25/day and it already hits with 14h.

image

image

binary-ex-machina commented 6 years ago

what you mean on tick?

binary-ex-machina commented 6 years ago

it won't work with tick list, because it gets the open time of the candle to project the trendline and comparte the actual value to see if it is below or above the trendline. On the bot we can't get the time when the tick happened. The bot get the higher value of a candle and open time. We can't get the time when the tick appear.

okovalov commented 6 years ago

Will start it too.

On Mon, Feb 26, 2018 at 9:32 AM, Binary Ex Machina <notifications@github.com

wrote:

i won't work with tick list, because it gets the open time of the candle to project the trendline and comparte the actual value to see if it is below or above the trendline. On the bot we can't get the time when the tick happened. The bot get the higher value of a candle and open time. We can't get the time when the tick appear.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/binary-com/binary-bot/issues/558#issuecomment-368521733, or mute the thread https://github.com/notifications/unsubscribe-auth/ABoK_dO4a-AEhjJXBT--k_4l7UtORwYyks5tYsCQgaJpZM4SSgIO .

-- "Success is simple. Do what's right, the right way, at the right time."

best regards, tradakad

CorreiaMerchant commented 6 years ago

testando man

binary-ex-machina commented 6 years ago

Results of the last 24 hours

image

Testing new config image

okovalov commented 6 years ago

@binary-ex-machina I was testing it on a bear market today, and I think I am getting a few ideas based on the results I saw: 1) I started at 4 pm GMT when return was about 80%, not 20, which already makes it way more safer..

image

2) it worked perfectly when the bear market started to grow

image

and started to lose when bear market started to fall

image

image

with that being said - I had an impression that if BEAR market grows then it worked ok, so , theoretically speaking, it might also work in an opposite way , so if BULL market falls, then it should work too, (having same payout ratio), however due to nature of the strategy and those two markets, I would say it needs to be adjusted, and have opposited contract definition values for BULL, (I might be wrong though), so tomorrow about same time GMT I would start it for both bull and bear and having bull version adjusted accordingly... and obviously there is no point to start before 3 or 4 pm gmt and it hast to be stopped at 11 pm gmt or so..

@binary-ex-machina lemme know what you think

Eshhh commented 6 years ago

Best settings until now..

capture

@binary-ex-machina is it good to use recovery bot money management on this bot?

okovalov commented 6 years ago

@binary-ex-machina

so this is the result for BULL (but it looks like the bot froze sometime at night, so might be not 100% valid)

image

and here is one for BEAR

image

unfortunately, v100 index results are not that good

okovalov commented 6 years ago

Sorry Eshh, but there are only 10 runs, I would not call it a reliable result

On Tue, Feb 27, 2018 at 7:28 AM, Eshhh notifications@github.com wrote:

Best settings until now..

[image: capture] https://user-images.githubusercontent.com/33750313/36728638-75b4174a-1be7-11e8-8e22-bb21df505935.JPG

@binary-ex-machina https://github.com/binary-ex-machina is it good to use recovery bot money management on this bot?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/binary-com/binary-bot/issues/558#issuecomment-368857814, or mute the thread https://github.com/notifications/unsubscribe-auth/ABoK_cNFstLJdSpM8c8LPRr_dYjmkY-Mks5tY_ThgaJpZM4SSgIO .

-- "Success is simple. Do what's right, the right way, at the right time."

best regards, tradakad

Jaywou911 commented 6 years ago

My result....... with trendline bot capture

Eshhh commented 6 years ago

@okovalov yes the bot was running for 10hrs and i didn't realize it froze somewhere in that time..

binary-ex-machina commented 6 years ago

@okovalov I get what you say. If the bot is running and the block 1 enters before the trend kicks, it will work better. The first block runs to determine the barrier, so we need to stay in there before watch the market and make the trade.

I'll make a function that do the check of the block 2 on the block 1, so we will always enter with the barrier sign that the trend is projecting (up + , Down -). Will post soon.

okovalov commented 6 years ago

@binary-ex-machina

here is the Bear results so far

https://docs.google.com/spreadsheets/d/1Zp9W9pi3jt_SEi-3t8P4w5hwbNCYuVLc7YbfN7yyeuA/edit?usp=sharing

and here is the Bull

https://docs.google.com/spreadsheets/d/17K5AG4_V27feqKw6NfIkf5pITdxUndSYD8PZFkciab4/edit?usp=sharing

binary-ex-machina commented 6 years ago

Here is another version. Now it will only enters the trade when the tick break the barrier (Up or Down), also determining the barrier sign.

image trendline v8.xml.zip

okovalov commented 6 years ago

why it has an empty "run after" though?

binary-ex-machina commented 6 years ago

Each time you put a run after, all the bot stops and will go after that period (1 second in our case), so the while loop will check the params and wait for another second. When it not meets the requirements, it goes beyond the loop. You don't need to put something on run after block, just let him hold the bot from go out the block 1.

okovalov commented 6 years ago

got it.. thx

janps1712 commented 6 years ago

I modified it to be Goes out instead and so far it is showing good results. Of course it need more testing.

image

Feel free to test it: Goes out.zip

xremmy commented 6 years ago

I also modified it to trade goes out, 3 mins duration, although i used martingale of 6 factor, didn't have a third loss in the first test before i lost connection and it was almost doubling the capital. 1st Stake 10 2nd Stake 70 3rd Stake 490.

But as we all know, martingale will fail oneday. trendline test 1 3 mins duration

okovalov commented 6 years ago

Results so far:

Bear (works nicely in a trend)

image

image

Bull (same thing)

image

image

Google Docs links are updated too

image

image

janps1712 commented 6 years ago

@okovalov Will you upload the xml with the setting for bear and bull?

CJAsmar commented 6 years ago

Yes @okovalov can you please upload the xml?

okovalov commented 6 years ago

Ok, I have stopped both for today, since GMT is almost over

Bear

image

image

Bull

image

image

Gdocs

here is the gdocs for Bear results

https://docs.google.com/spreadsheets/d/1Zp9W9pi3jt_SEi-3t8P4w5hwbNCYuVLc7YbfN7yyeuA/edit?usp=sharing

and here is gdocs for Bull results

https://docs.google.com/spreadsheets/d/17K5AG4_V27feqKw6NfIkf5pITdxUndSYD8PZFkciab4/edit?usp=sharing

Bots (basically it is a sogthly modified @binary-ex-machina 'trendline v7.xml.zip' with a changed markets for both bots and swapped barriers for the Bull market)

TrendLineV7_Bull(3).xml.zip TrendLineV7_Bear (2).xml.zip

okovalov commented 6 years ago

@CJAsmar @janps1712 but guys, DO NOT run this bot at the END OF THE DAY by GMT.. start it at at least 6-7 am GMT. or even better at 3:00 pm GMT (please see my notes above)

okovalov commented 6 years ago

@binary-ex-machina testing 'trendline v8.xml.zip'

binary-ex-machina commented 6 years ago

@okovalov thanks for the detailed report. I did some changes and add some management on Watch and Sell block (3). I'll test this for the next 12 hours and see how it goes.

janps1712 commented 6 years ago

@okovalov Ok, will start it today at 3:00 pm GMT. What do you mean with the end of GMT?

okovalov commented 6 years ago

@janps1712 END OF THE DAY by GMT

Baselope commented 6 years ago

@binary-ex-machina Very elegant bot. Good work. I did some analysis on your function calls and I have a question. The length of the candles list is never limited - i.e. you are passing all candles to the function. Suggestions:

Baselope commented 6 years ago

You can remove the following also: image I had one case of a connectivity problem which caused the arrays to give an "undefined" error. The function call then gets stuck using the last value of y3 - indefinitely. I.e. it kept trading with the same y3, because the function returned an error. I usually put the list definitions inside an IF, which does seem to help this problem.

binary-ex-machina commented 6 years ago

@Baselope you can remove the lists, they are not being used.

You can pass all the candles, there is no problem. What you changed didn't affect the bot, because it's already going from 2 to 16. It loops the number of times the period.

Limiting the candles before will not cause an increase of memory use. Anyway you will search the candles from the end.

Now about the connectivity. If you lost connection, your bot will stop. It will not trade no matter if the connection gets back, even if there is no trade going. Since the bot do the calculations inside the IF, y3 never gets the same value, if the bot is connected and running correctly

okovalov commented 6 years ago

@binary-ex-machina here is a result of running trendline_v8 for about 12 hours

image

trendline_v8_results_2_27_over_2_28.csv.zip

as you could see at the beginning it was ok, BUT only 20%of return makes all that profit to disappear..

binary-ex-machina commented 6 years ago

My results aren't good either. I changed the idea, adding the CHOP indicator and changing the trade type to Goes Out/ Stays In.

If the market is more on sideways, it Stays In. On the other side, if its trending it Goes Out.

there is some analysis on the block (3), trying to sell in 3 different times of the trade, with 3 conditions. We can add others as well. I think the ultimate bot is the one that adapts to the market, changing barriers/stake/duration to lower the risk when it's in a obscure market and when it's trending.

trendline v11.xml.zip

image

CJAsmar commented 6 years ago

Hello,

I tried testing @okovalov 's bull and bear but both lead to a loss in the end.

I am trying to test now @binary-ex-machina 's latest bot

okovalov commented 6 years ago

@CJAsmar my current results

image

image

binary-ex-machina commented 6 years ago

Version 11 isn't good. We are running out of options with this strategy. I'll test bot v8 for one more day.

okovalov commented 6 years ago

@binary-ex-machina

running bear + bull together gives me profit so far

okovalov commented 6 years ago

guys, I would probably say an obvious thing, but please don't try to double your depo in a few days. that is nonsense, and even though (hypothetically speaking) you'll get a gold duck, you really think you would be allowed to do that for a long time? guys, be patient and modest, even 3% profit a day gives you your depo in a month. and that kind of profitability would, very likely, tolerated by the broker, but having you earning everything at once would end up by blocking your account upon an investigation.

xremmy commented 6 years ago

Just read this in Binary.com's Risk Disclaimer

"Binary.com may have access to information that is not available to you, may have acquired trading positions at prices that are not available to you, and may have interests different from your interests. Binary.com does not undertake any obligation to provide you with market or other information we possess, nor to alter or refrain from our own trading."

This is scary and for volatility markets that the prices can not be compared with any other broker.

binary-ex-machina commented 6 years ago

The main problem is that if you aim for, let's say, $25 per day, investing $300 to start, you need to be sure that you wont lose all your money quickly. If a strategy work for an entire week, return positive earnings you will believe that it can work all the time on that week, that is wrong. I developed bots that can earn $50/h easily, but can't run 24/7, of course. The problem is on what time you will run the bot and profit from it.

All the bots I've created for testing on virtual account lately doesn't have stoploss and target profit, with is wrong because in real account we do have these limits. I'm testing now with this in mind, maybe running 2-5 cycles of $25 per day and see how the strategies results.

okovalov commented 6 years ago

@binary-ex-machina

so far I have been testing 'Bull + Bear' and, as you could see, it works

image image

UPDATE Just uploaded pictures from the updated spreadsheet with a few more formulas, to improve readability

binary-ex-machina commented 6 years ago

very nice. The idea of a twin bot is a good one. I'll test together as well.

okovalov commented 6 years ago

@binary-ex-machina I would test it for a week or so and then will add MM with 2% stake on each bot and 5% TP - not sure about SL yet, will be testing and then decide

binary-ex-machina commented 6 years ago

Ill test with stake 3, SL 150 and TP 25 on each. 300 is my balance right now.

okovalov commented 6 years ago

@nramade could you please open a new issue , instead of pasting unrelated things in the current one? that would make it easier to track changes and follow the thread.. thank you