Forex



Go Back   Forex Trading > Downloads > Indicators - Metatrader 4
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 08-21-2007, 05:13 PM
Member
 
Join Date: Dec 2006
Posts: 39
funyoo is on a distinguished road
Alert sent only when signal is confirmed

Hello,

I have a problem with my alerts that are sent when there is a signal, but the bar where is the signal is not yet finished during the sending. I would like that the signal be sent only after that the barne closed where the signal is made. Otherwise, the signal can disappear and reappear several times on the same bar, thus there is several alerts for a same signal.

Here is the code :

Quote:
if (Alerts == true)
{
UpArrow[i] = EMPTY_VALUE; DnArrow[i] = EMPTY_VALUE;
if ((DIR[i] == 1) && (DIR[i + 1] == -1)) UpArrow[i] = Sum[i + 1] - (Ask - Bid);
if ((DIR[i] == -1) && (DIR[i + 1] == 1)) DnArrow[i] = Sum[i + 1] + (Ask - Bid);
}


if (Alerts == true)
{
string AlertTXT;
if (UpArrow[0+p]!=EMPTY_VALUE && TurnedUp==false)
{
AlertTXT=" BUY: "+Symbol()+" - "+Period()+" at "+ DoubleToStr(Close[0],Digits)+ " - "+ TimeToStr(CurTime(),TIME_SECONDS);
Alert(AlertTXT); if (EmailON) SendMail(AlertTXT,AlertTXT);
if (SignalPrice == true)
{
ObjectCreate("BUY SIGNAL: " + DoubleToStr(Time[0],0),OBJ_ARROW,0,Time[0],Close[0]);
ObjectSet("BUY SIGNAL: " + DoubleToStr(Time[0],0),OBJPROP_ARROWCODE,5);
ObjectSet("BUY SIGNAL: " + DoubleToStr(Time[0],0),OBJPROP_COLOR,SignalPriceBUY);
}
TurnedDn = false; TurnedUp = true;
}
if (DnArrow[0+p]!=EMPTY_VALUE && TurnedDn==false)
{
AlertTXT=" SELL: "+Symbol()+" - "+Period()+" at "+ DoubleToStr(Close[0],Digits)+ " - "+ TimeToStr(CurTime(),TIME_SECONDS);
Alert(AlertTXT); if (EmailON) SendMail(AlertTXT,AlertTXT);
if (SignalPrice == true)
{
ObjectCreate("SELL SIGNAL: " + DoubleToStr(Time[0],0),OBJ_ARROW,0,Time[0],Close[0]);
ObjectSet("SELL SIGNAL: " + DoubleToStr(Time[0],0),OBJPROP_ARROWCODE,5);
ObjectSet("SELL SIGNAL: " + DoubleToStr(Time[0],0),OBJPROP_COLOR,SignalPriceSELL);
}
TurnedUp = false; TurnedDn = true;
}
}
What have I to do ?
Attached Images
File Type: gif alert.gif (4.6 KB, 149 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Indicators with alert/signal newdigital Indicators - Metatrader 4 2889 Today 03:58 AM
I need Stochastic Oscillator with alert/signal 200 Indicators - Metatrader 4 2 04-12-2009 09:19 AM
Signal Alert vidda Suggestions for Trading Systems 5 08-12-2007 07:05 AM
changes for ki signal rizdwan74kl Indicators - Metatrader 4 2 04-02-2007 11:50 PM


All times are GMT. The time now is 09:26 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.