Forex Factory (https://www.forexfactory.com/forum.php)
-   Platform Tech (https://www.forexfactory.com/forumdisplay.php?f=69)
-   -   Ichimoku Cloud Break Out Email Alert (https://www.forexfactory.com/showthread.php?t=500089)

ShanghaiMoon Aug 18, 2014 4:38pm | Post# 1

Ichimoku Cloud Break Out Email Alert
 
I was wondering if any body has an indicator that will send an email alert when price breaks out above and below the Ichimoku cloud or if they could point me in the right direction of where I could get one. Thanks in advance!

Gumrai Aug 18, 2014 9:42pm | Post# 2

1 Attachment(s)
I was wondering if any body has an indicator that will send an email alert when price breaks out above and below the Ichimoku cloud or if they could point me in the right direction of where I could get one. Thanks in advance!
Hi,
this is a work in progress, it only works with closed candles
Please try it and let me know if any problems

At the moment it has 3 conditions:
Tenkan above/below the kijun , if above is a buy condition, if below a sell
Price closes above/below tenkan, same, above - buy, below - sell
Price closes above/below the cloud, same. above - buy, below - sell

You can select 1, all or a combination of conditions. If you just want the signal when price closes above/below the cloud, you would set that condition to true and the other 2 to false.

I welcome any suggestions for additional conditions.
Ichimoku_Conditions.ex4

ShanghaiMoon Aug 18, 2014 10:44pm | Post# 3

{quote} Hi, this is a work in progress, it only works with closed candles Please try it and let me know if any problems At the moment it has 3 conditions: Tenkan above/below the kijun , if above is a buy condition, if below a sell Price closes above/below tenkan, same, above - buy, below - sell Price closes above/below the cloud, same. above - buy, below - sell You can select 1, all or a combination of conditions. If you just want the signal when price closes above/below the cloud, you would set that condition to true and the other 2 to false. I...

Thanks again gumrai, this looks amazing! Won't be able to try it out till tomorrow morning.

symona Aug 19, 2014 11:26am | Post# 4

Hi Gumrai, great work, thanks for the indicator. You asked for suggestions, so how about adding an alert when Chikou Span crosses price?

Also any way the indicator can alert immediately instead of candle close on all conditions?

Best regards...

ShanghaiMoon Aug 19, 2014 1:03pm | Post# 5

{quote} Hi, this is a work in progress, it only works with closed candles Please try it and let me know if any problems At the moment it has 3 conditions: Tenkan above/below the kijun , if above is a buy condition, if below a sell Price closes above/below tenkan, same, above - buy, below - sell Price closes above/below the cloud, same. above - buy, below - sell You can select 1, all or a combination of conditions. If you just want the signal when price closes above/below the cloud, you would set that condition to true and the other 2 to false. I...

the indicator appears to be working great! i was wondering though is there any way you could have it set up when the trigger for the arrows to be painted is the price closing above or below Tenkan sen, but have it so it only draws the air when the the other conditions are met? also would it be possible to add Chiko span having to be above price and cloud/below price and cloud for tenkan sen crosses to be considered triggers?

*better example*
Buy arrow would be drawn when price closes above tenkansen (crosses) while price is above cloud, TK is aboe KS, and C span is above Price and Cloud. and vice versa rules for shorts.

also alert draw when price breaks out of cloud while price is above TK, TK is above KS, and Cspan is above price and cloud. and vice versa for short.

if this is possible that would be sooo amazing!

thanks again for all the works youv done already man!

Gumrai Aug 19, 2014 6:09pm | Post# 6

Hi Gumrai, great work, thanks for the indicator. You asked for suggestions, so how about adding an alert when Chikou Span crosses price? Also any way the indicator can alert immediately instead of candle close on all conditions? Best regards...
I don't actuall see the point of the chikou span. I believe it to be misleading because it is simply current price shifted back kijun periods. It always looks good where it crosses the price on the chart because it is effectively "looking into the future"
You will note that where the kijun is set to 26, the most recent 26 bars do not have the chikou line drawn because "looking into the future" is impossible.
If you would like the chikou line used in the indicator, you will need to explain how.

I can code the indi to alert immediately instead of waiting for the candle close, but when the conditions are simple, this can result in a flurry of alerts. This is because price can sometimes cross and re-cross a line many times during the life of a candle.
Also, if conditions are true while a candle is still open, an arrow will be placed on the chart. But if conditions are no longer true at the candle close, if the chart is refreshed, the arrow will "disappear". Then come the comments about the indi repainting.
If you really want this, let me know and I will modify the code as/when I have time.

Gumrai Aug 19, 2014 6:29pm | Post# 7

{quote} .....
the trigger for the arrows to be painted is the price closing above or below Tenkan sen, but have it so it only draws the air when the the other conditions are met?
Sorry, I have no idea what this means

would it be possible to add Chiko span having to be above price
See my reply to Symona

*better example*
Buy arrow would be drawn when price closes above tenkansen (crosses) while price is above cloud, TK is aboe KS, and C span is above Price and Cloud. and vice versa rules for shorts.
Do you mean that the alert will only be triggered on an actual cross?
Ie. if price is already above the tenkan when price closes above the cloud, an alert will not be triggered unless price re-crosses below the tenkan and then crosses up again

ShanghaiMoon Aug 19, 2014 10:04pm | Post# 8

{quote} {quote} Sorry, I have no idea what this means {quote} See my reply to Symona {quote} Do you mean that the alert will only be triggered on an actual cross? Ie. if price is already above the tenkan when price closes above the cloud, an alert will not be triggered unless price re-crosses below the tenkan and then crosses up again

Thats exactly what what I mean, sorry my explanation was rough. But yes it would need to re cross the tenkan sen for another alert to be generated while c span is above price and cloud and price is above price and cloud etc

symona Aug 20, 2014 7:54am | Post# 9

Hi Gumrai. Thank you for the reply. Much appreciated my friend.

So, regarding the Chikou span, I would like to be alerted when it crosses the candles (past price) and also if possible the cloud as well. The idea is that when the current price breaks out of the current cloud and the Chikou has broken above/ below the past cloud as well, it is apparently said to be a good breakout confirmation.

I am glad to hear that you can code the instant alert and I understand your concern regarding multiple notifications. Correct me if I am wrong but I understand that it is possible to have only one alert per candle in the code? If so, then that would be ideal.

Lastly, if you could be so kind, and it's not too much trouble I can do without the arrows on the chart as it clutters it. I only need push notifications. If you can please remove them it would be great.

Thanks again for your time

Warm regards,
Symona

Gumrai Aug 20, 2014 9:05am | Post# 10

{quote} Thats exactly what what I mean, sorry my explanation was rough. But yes it would need to re cross the tenkan sen for another alert to be generated while c span is above price and cloud and price is above price and cloud etc
I will try to make the additions as/when i have time

Gumrai Aug 20, 2014 9:09am | Post# 11

Hi Gumrai. Thank you for the reply. Much appreciated my friend. So, regarding the Chikou span, I would like to be alerted when it crosses the candles (past price) and also if possible the cloud as well. The idea is that when the current price breaks out of the current cloud and the Chikou has broken above/ below the past cloud as well, it is apparently said to be a good breakout confirmation. I am glad to hear that you can code the instant alert and I understand your concern regarding multiple notifications. Correct me if I am wrong but I understand...
I will make modifications to allow arrows to be shown/not shown. Best to leave it as an option as it allows you to cast your eyes over the chart and see where signals occured with certain settings. Bearing in mind that any signals on the past chart will only work on closed candles.
I think that I understand what you want with the Chikou and will add that as a condition option.

symona Aug 20, 2014 9:16am | Post# 12

Gumrai, looking forward to adding these conditions to my alert arsenal. I am sure it will help a great deal.

You didn't say, any chance you can modify the candle close to be instant instead with a single alert per candle?

Kindly let me know...

ShanghaiMoon Aug 20, 2014 10:43am | Post# 13

{quote} I will try to make the additions as/when i have time
thank you gumrai! you are the man!!

Gumrai Aug 20, 2014 11:37pm | Post# 14

1 Attachment(s)
Hi,
New version attached, please test it out.
I've not tested it very much myself.
Added options to
show/not show arrows
Work with closed candles only/ calculate with the current open candle
Price crosses tenkan
chikou above/below its price
chikou above/below its cloud

The chikou relative to the current bar is shifted back kijun periods. Thats 26 by default.
So chikou above/below its price means the price 26 candles ago and chikou above/below its cloud refers to the cloud 26 candles ago.
Ichimoku_Conditions v2.ex4

symona Aug 21, 2014 1:50am | Post# 15

Thank you Gumrai for your work. Much, much appreciated.

any chance you can post the source code so I can make some changes to the push notification alert language? I use short form codes that I recognize easier and take less space. I would not want to bother you to modify...

Cheers my friend.

Gumrai Aug 21, 2014 5:20am | Post# 16

Thank you Gumrai for your work. Much, much appreciated. any chance you can post the source code so I can make some changes to the push notification alert language? I use short form codes that I recognize easier and take less space. I would not want to bother you to modify... Cheers my friend.
Sorry, but I don't always want to post my source code.
If you let me know what code you want for the notification, I could write it into the code.
Or if inputting a string for the message would be useful, let me know.

The code has
MessageText=Symbol()+". "+tf; //tf being string time-frame
in init

For a buy signal for example there is a function call
SendAlerts("Itchimoku_Conditions Buy Signal");

and the function is
Inserted Code
 void SendAlerts(string t )
  {
  if(Time[0]>LastAlertBarTime)
    {
    LastAlertBarTime=Time[0];  
    string message=TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES)+", "+MessageText+t;
    if(EnablePopUp)
       {
       Alert(MessageText+t);
       Print(message);
       }
    if(Send_Email)
       SendMail("MT4 Alert, Ichimoku_Conditions",message);
    if(Send_Push)
       SendNotification(message);
    }
  }

symona Aug 21, 2014 8:15am | Post# 17

Hi Gumrai. I understand completely. So, when you have a moment please modify the following:

Push notifications should have the exchange then the timeframe followed by the condition and then the price when it happened all in CAPITALS:

Example: EURJPY H4 PRICE CROSSED TENKAN 134.200

All conditions should state:

TENKAN CROSSED KIJUN
PRICE CROSSED TENKAN
PRICE CROSSED KUMO
CHIKOU CROSSED PRICE
CHIKOU CROSSED KUMO

Thanks a million!

symona Aug 21, 2014 8:20am | Post# 18

Gumrai, I almost forgot, if the code allows for specific direction then feel free to add to the message like this:

EURJPY CHIKOU CROSSED PRICE FROM BELOW 134.200

OR

EURJPY TENKAN CROSSED KIJUN FROM ABOVE 134.200

Etc...Same can apply for all conditions in code.

Gumrai Aug 24, 2014 8:03pm | Post# 19

1 Attachment(s)
I have made some changes.
I had to wait for the market to open so that I could at least do minimal testing.
There was a minor issue with it painting some extra arrows when working with open bars and I have corrected that now.
I have also modified the message for emails and push notifications to be something similar to symona's request.
Ichimoku_Conditions v3.ex4

symona Aug 25, 2014 11:05am | Post# 20

Hi Gumrai. The alerts don't work. Do you want to give it a look?

Thanks buddy, cheers.

Gumrai Aug 25, 2014 3:58pm | Post# 21

Hi Gumrai. The alerts don't work. Do you want to give it a look? Thanks buddy, cheers.
Which alerts don't work?
Pop-up, email and/or push?
Did they work on the previous version?
I don't use email or push alerts myself and so only tested the pop-up. I checked the email and push text by temporarily placing a comment on the screen and it seemed ok.
Just to be sure, you have set the input for the alert to "true"?

symona Aug 25, 2014 5:00pm | Post# 22

Gumrai,

Inputs are indeed all set to true. No alerts whatsoever.....

Sorry but I can't seem to get them to work at all.

I watched as price went through cloud no alert no arrow

also watched Tk cross - nothing.

Gumrai Aug 25, 2014 7:21pm | Post# 23

Gumrai, Inputs are indeed all set to true. No alerts whatsoever..... Sorry but I can't seem to get them to work at all. I watched as price went through cloud no alert no arrow also watched Tk cross - nothing.
You do realise that if
Tenkan above(Buy)/below(Sell) the kijun is set to true
and
Price closes above(Buy)/below(Sell) the cloud is set to true
You will not get an alert unless BOTH conditions are satisfied?
ie. price may move above the cloud, but if the tenkan is below the kijun, you will not get an alert.
Add a 3rd condition and all 3 will need to be satisfied.
If you set All the conditions to true, they will ALL need to be satisfied to send an alert.

By the way, I should have changed
Price closes above(Buy)/below(Sell) the cloud
to
Price above(Buy)/below(Sell) the cloud
when I changed the indi from only working on closed candles. It will not wait for the candle to close if ClosedBarsOnly is set to false.

symona Aug 26, 2014 4:05am | Post# 24

Thank you for the clarification Gumrai. I got it now. I am slow...Much appreciated.
Therefore I should load several copies of the indi to satisfy all conditions separately? I hope they work individually.

Also, my friend please please take a few minutes and remove the date and time and the ICHIMOKU on the beginning of the push notifications messages.

All I need is the currency, timeframe, followed by the condition and price.

EURJPY H1 TENKAN ABOVE KIJUN 137.000

Thank you for everything.!!!

symona Aug 28, 2014 1:09pm | Post# 25

Hello Gumrai, sorry to bother but I really need the push messages modified as they don't work well. You mentioned that you don't use push notifications so I am not sure you know that the message doesn't show the EURJPY D1 followed by the condition and price. All I get is the date, the time and ICHIMOKU SELL/BUY.

Evidently there is no room for the essential message. It's too long...

Please take a look at the code when you can.

Take care
Symona

Gumrai Aug 28, 2014 4:18pm | Post# 26

1 Attachment(s)
Symona,
Can you please test this and see if it sends push notifications without cutting the message short?
Ichimoku_Conditions v3.1.ex4

symona Aug 28, 2014 4:25pm | Post# 27

Okay. I am on it.

Will let you know. Thanks.

symona Aug 28, 2014 4:38pm | Post# 28

Okay getting closer. Now I get some more but not all.

This is what I see:

20.14.08 16:32, ICHIMOKU BUY. 136.714
EURJPY D1

NO CONDITION (TENKAN ABOVE KIJUN)

Gumrai Aug 29, 2014 12:15am | Post# 29

I have removed the line breaks for push notifications. They are allowed to be up to 255 characters, but maybe there is a limit on lines or something.
Strange that the date in your message shows as 20.14.08 16:32 A very strange date/time format that doesn't make sense. I've also removed the date from the message.
If this doesn't work, then I am afraid that I am totally at a loss and you will need to send me a sample code that combines multiple strings for push notifications.

symona Aug 29, 2014 12:47am | Post# 30

Hello my friend. Removing the date and time has made more room and I see the conditions now. Thank you for taking the time to fix it.

Just wondering, is there no way to remove the ICHIMOKU BUY/SELL completely (to be on the safe side) because if a different condition message is longer it may cut it short again.

I was only able to test the PRICE BELOW TENKAN which is a short message....

symona Aug 29, 2014 12:58am | Post# 31

Yeap, just got:

PRICE CROSSED ABOVE TE

TENKAN was cut short.

Gumrai Aug 29, 2014 4:58am | Post# 32

1 Attachment(s)
..... remove the ICHIMOKU BUY/SELL completely (to be on the safe side) because if a different condition message is longer it may cut it short again. ....
Just removed it
Not changed the file name
Ichimoku_Conditions v3.2.ex4

symona Aug 29, 2014 7:09am | Post# 33

Hey Gumrai. I promise this will be the LAST request for this great piece of work. That's why I asked you for the source code so I won't bother you....

Here is the thing: I use a computer system that recognizes and acts on the push signals that's why I need the messages to have a specific order. If you want you can perfect it by putting the currency first and the price last as well as no dots and no double space (single space is fine) My program simply doesn't work without that sequence.

Let me know.

Gumrai Aug 29, 2014 8:18am | Post# 34

I can easily modify so putting the currency first and the price last.
What about the time-frame?

symona Aug 29, 2014 9:14am | Post# 35

That's very kind of you sir.

The timeframe shall be between currency and condition. Second in line:

EURJPY H4 PRICE CROSSED TENKAN 134.200

Thank you....

Gumrai Aug 29, 2014 9:40am | Post# 36

1 Attachment(s)
OK
Try this.
If this doesn't work for you, then I am afraid that I will have to admit defeat and I will do no more modifications to the push alert.
Ichimoku_Conditions v3.3.ex4

symona Aug 29, 2014 9:59am | Post# 37

No don't say that. I am sure it will be fine.

You are an excellent coder and should be proud to help others regardless of outcome.

I will test and keep you apprised my friend. Talk soon.

symona Aug 29, 2014 10:15am | Post# 38

You did it! It's perfect.

Best regards,
Symona

Gumrai Aug 29, 2014 4:26pm | Post# 39

Well I Am relieved, it was getting frustrating

Brixen Aug 31, 2014 6:12am | Post# 40

Hello GUMRAI,
on friday afternoon (european time) I've tested your wonderful indicator v3.3 with the ONLY condition TRUE: only PRICE ABOVE/BELOW THE CLOUD.
I've set on TRUE also: ENABLE POP UP ALERT, AND SEND PUSH NOTIFICATION ALERT but I haven't received any messages. I'll be test another time on monday morning but I wish ask you if I made something wrong.
Thanks in advance for your reply.


© Forex Factory