The logic here prevents multiple alerts during the time period of the current bar.
When a new bar comes, a new alert is possible.
phy:
The logic here prevents multiple alerts during the time period of the current bar.
When a new bar comes, a new alert is possible.
I understood it well.
Thank you for your kind.
another question
I think if want to cross sign ,need now and previous
I think not need MAafter
How do you think??
↓
if ( (fasterMAnow > slowerMAnow) && (fasterMAprevious < slowerMAprevious) && (fasterMAafter > slowerMAafter))
addition
now my EA like this
if(FastMA2 <= SlowMA2 && FastMA1 > SlowMA1)
{
ClosePositions();
OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,Ask-SLpips*Point,Ask+(45*Point),"", MAGIC, 0,Blue);
return(0);
i want to change like this
1. 15minutus timeflame happen buy sign
2. if then 5minutes timeflame MA cross buy sign already ,too
ClosePosition. and get new position
if then 5minutes timeflame MA change sell sign already
wait 5minutes timeflame change buy sign ,
then ClosePosition. and get new position
Please tell me how to write this program.
if(FastMA2 <= SlowMA2 && FastMA1 > SlowMA1)
{
ClosePositions();
OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,Ask-SLpips*Point,Ask+(45*Point),"", MAGIC, 0,Blue);
return(0);
i want to change like this
1. 15minutus timeflame happen buy sign
2. if then 5minutes timeflame MA cross buy sign already ,too
ClosePosition. and get new position
if then 5minutes timeflame MA change sell sign already
wait 5minutes timeflame change buy sign ,
then ClosePosition. and get new position
Please tell me how to write this program.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I think " if ( alertTag!=Time[0]) " means if not same send mail and alert
but I do not understand " alertTag = Time[0]; " meaning at all .
alet and send mail is finish.why need this code????
if ( (fasterMAnow > slowerMAnow) && (fasterMAprevious <
slowerMAprevious) && (fasterMAafter > slowerMAafter)) {
CrossUp[i] = Low[i] - Range*0.5;
if ( alertTag!=Time[0]) ←
{
PlaySound(SoundWAV);// buy wav
Alert(Symbol()," M", Period(), " MA cross BUY");
SendMail(Period()+" hit MA long ", Bid +"long");
}
alertTag = Time[0]; ← what mean???
}