binary-com / binary-bot

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

Strategy with Pin Bar and Simple Moving Average Indicator - 81% Won #507

Closed Relicetti closed 6 years ago

Relicetti commented 6 years ago

Hello guys,

I am trying create this strategy below:

Binary Chart Setup Indicators: Pin Bar for MT4 (optional), 200 simple moving average Time Frame: 5 Min Trading sessions: Euro, US Assets: You can use this strategy on any pair (EUR/USD, GBP/USD, USD/JPY,…) Expiry time: 15 min (3 bars)

Trading Rules

CALL Option (UP):

Price must be above the 200 simple moving average (bullish trend) Bullish pin bar Buy Call Option Set expiration time: 15 Min

PUT Option (DOWN):

Price must be below the 200 simple moving average (bearish trend) Bearish pin bar Buy Put Option Set expiration time: 15 Min

more information here: http://www.dolphintrader.com/binary-options-strategy-pin-bar-simple-moving-average-indicator/

Someone have any idea how to create this?

Thanks a lot.

binary-ex-machina commented 6 years ago

I didn't test on the forex pairs, but it work nicely on volatility indexes. It needs more tests, but i think is what you are looking for.

pinbar

Pin Bar.xml.zip

Daler4ik commented 6 years ago

@binary-ex-machina Could you help me create an Average True Range indicator? Thank you.

binary-ex-machina commented 6 years ago

@Daler4ik i have one: https://github.com/binary-ex-machina/binary.com-bot/wiki/Indicators#average-true-range

Its using Simple Moving Average to calculate the true range.

Relicetti commented 6 years ago

@binary-ex-machina, Thank you so much! It worked well.

Daler4ik commented 6 years ago

@ binary-ex-machina, Thank you very much!

CJAsmar commented 6 years ago

Hello @Daler4ik,

Could you please share the final bot with us? The one that won 81% of the times?

Thank you

janps1712 commented 6 years ago

@binary-ex-machina

Do you know how to make this system buy on the opening of the next candle?

binary-ex-machina commented 6 years ago

@janps1712 you can find this modules on Math and Binary>Tools>Time. This works taking the all time timestamp, dividing and providing you the remainder of the calculation. By diving that by 60, you get the seconds from 0 to 59. If you want to have candles with 2 min, just divide by 120, 3min with 180 and so on.

remember that if you start the trade on 0, it will enter the trade at 2 seconds. If you want to enter the trade on 0, you need to enter on 58.

epoch

Daler4ik commented 6 years ago

@CJAsmar, Dear friend, this is not my bot

janps1712 commented 6 years ago

@binary-ex-machina Thank you!

Just to be sure. In this system the default candle interval is 5 min. So I should set it to 5x60 = 300?

binary-ex-machina commented 6 years ago

@janps1712 yes and instead of using 58 to enter the trade, would be 298

janps1712 commented 6 years ago

@binary-ex-machina

Again, thank you

janps1712 commented 6 years ago

@binary-ex-machina

It started well and the bot did make some trades. Now it have not made a trade for many hours.

image

Is this correct? I also tried to enter 298

binary-ex-machina commented 6 years ago

the pins most of the time doesn't get the values on the start of the candle, so it's better to remove the reminder of epoch. If you want to have one trade per candle

do like this

bullpin

CorreiaMerchant commented 6 years ago

I did an analysis on this bot with 81% success and in some cases does the operation when the candles take the opposite direction very strongly, Could you create a sales block on the market before the end of the negotiation?

in case one of the candles after a purchase or sale back 30%?

in this way the trade would be closed without losing the total value of the trade effected, the loss would be lower

image

Relicetti commented 6 years ago

@CorreiaMerchant

I did that you wrote above, take a look:

image

It worked until now.

What do you think?

CorreiaMerchant commented 6 years ago

@Relicetti

Note that in one of the situations is using the mathematical factor (X) and in another option is using the mathematical factor (÷)

Is this form correct? would not the two be alike?

detail the logic to assess whether it is correct,

But the idea is this, to reduce the pretas before closing the trade, I believe that in this way besides maintaining the winning trade we will reduce the losses

image

CorreiaMerchant commented 6 years ago

@Relicetti I've been testing and this setting also limits the gains on some occasions and not just the losses as it should be,

we will try to improve and improve this idea because it is excellent

binary-ex-machina commented 6 years ago

@Relicetti i would recommend put the set List and set Value outside the Run After block, because it will assign values on it that harms Pin indicator

CorreiaMerchant commented 6 years ago

@binary-ex-machina, I believe that this is exactly what has generated an unsatisfactory result.

Relicetti commented 6 years ago

@CorreiaMerchant e @binary-ex-machina,

I made some changes in the logic.

@CorreiaMerchant, The mathematical factor needs to be different,

If the entry spot is 1, for example.

in case of RISE: The bot will sell the market if Value is less than 1 (entry stop) x 0.9 ------ Value less than 0.9 in case of FALL: The bot will sell the market if Value is greater than 1 (entry stop) / 0.9 ------- Value greater than 1.1

Take a look: image

CorreiaMerchant commented 6 years ago

@Relicetti, I think the reading is much better, we will test it now and later we will come back here for discussions about the results, I believe that here we are creating a sensational bot

binary-ex-machina commented 6 years ago

the contract detail entry spot will work only on the Result block (4), as you can see it is disabled. You can register the spot (using last tick) when the bot purchases (2), then use in your calculation

CorreiaMerchant commented 6 years ago

@binary-ex-machina e @Relicetti

Friends, excuse me if it is impertinent because I do not have experience as a programmer, but I believe that my experience in being an operator can help a lot, since there are long periods of experience:

I believe that on some occasions the (pin-bar) is not reading correctly, because it should read as a signal when the shadow or wick of the candle is at least 2 times larger than the body of the candle,

Another way to filter to improve the Bot would be if there was a way to detect support and resistance:

For example:

The price is above the average of 200 a pin-bar appears next or equal to a support region where the price has already touched more than twice in this region

remembering that the bullish signal is when the wick or shade is on the bottom of the candle

and the low signal is when the wick or shade is at the top of the candle

binary-ex-machina commented 6 years ago

I checked the strategy to sell on market before the trade finish, and using the ideia of @Relicetti doesn't have too much effect, the problem persists. The calculation of the profit is made using time too, not only pips, so you may find a better way working with the profit loss, after this calculation.

@CorreiaMerchant i did a basic function to get support and resistance levels on certain periods and compare to the last tick plus/minus some number, so it can be tracked closer to the spot. But this case will work only for bounce. If you want to get when it breaks the support/resistance levels it should change the rule.

I don't think this strategy of the pins get 81% win on binary options because every indicator was made for markets without expiration time. Binary has expiration time, so this indicator will not work well. If you have some price action strategy we can try to create and i think we will get better results.

image pinbot.xml.zip

CorreiaMerchant commented 6 years ago

@binary-ex-machina,

Ok, I have an analysis in mind that guarantees many wins and few losses, there are times when the bot will make few entries, about 2 or 3 and in some moments 1 single entry, but if we make a proper financial strategy and at each entry we win from 3% to 5% of profit, in 30 days we will have gained an absurdity:

THE STRATEGY CONSTITUTES:

5-minute graphic time each 15-minute operation

(3 MOVING AVERAGE)

EXPONENTIAL 305 (close) EXPONENTIAL 9 (open) EXPONENTIAL 5 (close)

When the average of 5 crosses the average of 305 from the bottom up, the first ticket above opens a purchase of 15 minutes. (if the average of 9 periods crosses the average of 5 periods from the bottom up before the end of the operation it must be closed)

When the average of 5 crosses the average of 305 from top to bottom, the first ticket below opens a sale of 15 minutes. (if the average of 9 periods crosses the average of 5 periods from top to bottom before the end of the operation it must be closed)

image

although this strategy is using means to make the entries, they are reading the price action, notice that whenever the media 9 indicates a collision with the media 5 is a sign of reversion

binary-ex-machina commented 6 years ago

i got it, it's a simple bot to make, but it seems to work nice only on sideway market, when it's trending you don't trade, right? Using cross-down EMA5/EMA9 you can sell at market to prevent too much loss in a Call and vice versa for Put. any idea how to get this working on a trending market?

CorreiaMerchant commented 6 years ago

@binary-ex-machina, it works in trend and lateral market, note that ema 305 always follows in trend, when it is lateralized the market still continues to fall or up

it may be that in some days not more than 2 entries, but the likelihood of success is almost 100%

binary-ex-machina commented 6 years ago

Please open another issue to create this bot, i think it's worth get some focus on this.

another thing is the exit point of your strategy. If each candle is a 5min candle, the trade will end on the 3 candle (assuming a 15min trade) so the EMA5/EMA9 will not cross in time to sell the contract.

Maybe if it uses 1min trade, you can use this idea.

CorreiaMerchant commented 6 years ago

@Relicetti and @binary-ex-machina,

Friends, what do you think about scheduling a 5-minute break after each trade? This can reduce loss amounts, at least by analyzing the graph, tends to hit more

CJAsmar commented 6 years ago

Hello all, I was thinking maybe we can use a progression after each loss until a win is reached so that we minimise losses to zero. So whenever a loss happens, the bot increases the stake to an amount to cover the total preceding losses. Such as this: progression

CorreiaMerchant commented 6 years ago

@CJAsmar ,

In this case it is worth emphasizing here that it is necessary to have a very pure financial control and not to program the normal entries with very high values since there are losses followed the balance is not consumed by the prograssão, I do not know yours, but here in my tests until the moment that gave operand in volatility 50 was 3 loss,

I believe it is the 50 volatility so far the best option for this bot,

What is your opinion?

CJAsmar commented 6 years ago

That is true, however if we start with a low amount, such as $0.35, the progression can be as follows, "0.35,1.1,2.69,6.08,13.29,28.65,61.35,130.96" That is having 8 losses in a row with only around $244 at stake. This is almost impossible to happen and yet very profitable. And even with a lesser stake, such as 5 losses in a row or 6, the stake would be between $20 and $50 which is not that high for a winning strategy.

binary-ex-machina commented 6 years ago

starting with low amount it will take a lot of time to gain substantial amount. Martingale style of progression are not good in a long run. It's better to aim the bot to win 70-75% of the time in a 1/2 rate of profit.

Ex. Stake $10 with $5 on winning 7 trades - Ideal Balance and stop loss $30 5 wins - $25 2 losses - $20 Profit - expected at least $5 on full cycle Target - 7 trades or $15

$15 each day with a starting balance of $30, you can increase the stake to a good number, but i think this pays at least the electricity and internet needed to keep the bot running and saving some money.

No martingale or other progressive money management, so we avoid big losses and focus on the strategy. I have tested more then 50 bots using martingale and none of them are safe to run, even for a short period of time. One day it gives you good money, other day it swallow all your previous gains and on each loss we raise the hope that in the next trade it will recover and then you brake.

CorreiaMerchant commented 6 years ago

@binary-ex-machina,

in this case that quoted above, it is possible to insert the reading of support and resistance and also the break in the same bot?

for example:

NOT BREAKDOWN if it hits the media and the price closes inside the media and then the operation would open as call

if you hit the resistor and close inside the resistor then the operation would be PUT

DISRUPTION if you break the support and the price close off the support then it would be put because it would have broken if it breaks and the price close off the resistance then it would be Call because it would have broken

image

binary-ex-machina commented 6 years ago

@CorreiaMerchant What you mean media? The price can close closer the media if its a signal, but how much closer? If you can, please put in trading view with the support and resistance lines and mark the call/pull

elyyyes commented 6 years ago

HI EVERYBODY,

@Relicetti @binary-ex-machina @Daler4ik @CJAsmar @janps1712

Maybe i can help with my theory, someone can tell me if how can we compare numbers upper and lower the candle.

example we have a wave movement of many moving average lines 6 OR 9 OR 12 OR MORE and we apply the 33.33/66.66 math ... example for 12 MA lines , if we have 8 lines upper the candle and 4 under the candle we trade FALL and reversal

someone can tell me with a link or with a screenhot how to write this function

and thank you in advance for help, good job for all

alansilva1 commented 6 years ago

Pessoal chegou a dar essa quantidade de Loss. Alguém poderia informar se teria uma melhora no robô ?? robo print

gokula-krishna-dev commented 6 years ago

We're closing this issue due to inactivity, you're welcome to open it again if you still haven't got your answer.

binary-ex-machina commented 6 years ago

So people are selling this script for $100. What a shame, that's why this repository is abandoned.

elyyyes commented 6 years ago

Someone can tell me if i can create a variable duration contract ?!!

Example :

Finish in the same candle ... if candle is 00h:15m:00s minutes ... and my condition come in 00:03:28 ... contract duration must be 00:11:32 ... and if the condition arrive when the duration not allowed (because we can't open a contract with a duration lower than 00:05:00) the bot continue reading for the next trigger

And same for other candles durations ... 10m 15m 30m 1h

Hope it's explained well

Best regards

binary-ex-machina commented 6 years ago

@elyyyes stop spamming your request in other posts, create a new issue for this

elyyyes commented 6 years ago

I think that i tagged your comment with a LIKE but i comment in the same place because i need the same technique as i know but in the same candle and not in the future candle ... it's not a spam mr @binary-ex-machina

i'm sorry for disturbing you, but is it possible to help me on it please ?

image

i have created an issue 2 days ago, but after a few search on github i think that's what i need for this reason i comment :-(

sorry again

Le lun. 16 juil. 2018 à 13:34, Binary Ex Machina notifications@github.com a écrit :

@elyyyes https://github.com/elyyyes stop spamming your request in other posts, create a new issue for this

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/binary-com/binary-bot/issues/507#issuecomment-405232599, or mute the thread https://github.com/notifications/unsubscribe-auth/AcT8WkQ3fNNSExYAkcuqY62bbenFW8LVks5uHIg-gaJpZM4R0q1U .

ubarta commented 6 years ago

I´m not sure if pinbars and moving averages are the way to go for Forex. Pinbars are much more effective on Support / Resistance lines or even on Fibonacci levels. See https://mt4trendindicator.com/price-action-indicator/ for examples.

binary-ex-machina commented 6 years ago

@ubarta any free alternative?

chrisOburu commented 3 years ago

@binary-ex-machina how can you calculate choppiness index of ticks rather than candles