volshebnik: Thank you very much ! It worked, but rarely, sometimes the same error occurs - 130....... ( Do I always have to normalise stops or only on indices ? (just on currency pairs stops have always worked without normalisation, in my opinion).
Add to the code:
if ( Error!=0 )
Print("OrderSend() Error=",Error," ОткрФрвверх=",ОткрФрвверх," SL=",SL," TP=",TP);
artemida70, I have a problem with testing an EA. I need to delete the old history, which is in the history folder in the terminal directory. I don't know how to enter the terminal directory, I have tried all the icons and nowhere have I found what I am looking for. I haven't had to delete historical data yet. Probably there are several files in the history folder, if so which one contains the historical data? I don't want to cause any extra problems. Also, if you don't mind, I don't have a stabilizer on my computer and had a power failure today. I switch the terminal on and the status bar and toolbars have disappeared on the screen. I switched them back on, but after switching the terminal off, they disappeared again. I know I did this once before and I found in the user manual how to reset it, but now I can not do it again, I have to read everything once again. You're welcome. :)
coronel, artmedia70, thank you very much for your answers and additions.
It turns out I have a problem not with the code, but with something else (probably already with my head :-))). I don't have any of the scripts working, although any of the EAs are working. I started attaching to the chart all the scripts I found in my MT4, and none of them works - for example, script close (copyright metaquotes), script ByMarketBuySymbols (copyright KimIV) and others. They all log loaded successfully, and then immediately removed. Button "Expert Advisors" is enabled. I have not checked one terminal, but two - Life and Fx4U. I have tried both of them, they may not both be glitchy. What to do? How do I make the scripts work?
Hello, in this EA the alerts pop up every 5-10 sec. and I need only on M30 trading signals, which are marked with green and red dots on the charts. can someone help me? Thank you.
//ADX Crossing.mq4
//| Amir
//+------------------------------------------------------------------+
#property indicator_chart_window#property indicator_buffers 2#property indicator_color1 Lime#property indicator_color2 Red//---- input parametersexternint ADXbars=14;
externint CountBars=350;
//---- buffersdouble val1[];
double val2[];
double b4plusdi,nowplusdi,b4minusdi,nowminusdi;
//+------------------------------------------------------------------+//| Custom indicator initialization function |//+------------------------------------------------------------------+int init()
{
string short_name;
//---- indicator line
IndicatorBuffers(2);
SetIndexStyle(0,DRAW_ARROW);
SetIndexArrow(0,108);
SetIndexStyle(1,DRAW_ARROW);
SetIndexArrow(1,108);
SetIndexBuffer(0,val1);
SetIndexBuffer(1,val2);
//----return(0);
}
//+------------------------------------------------------------------+//| AltrTrend_Signal_v2_2 |//+------------------------------------------------------------------+int start()
{
if (CountBars>=Bars) CountBars=Bars;
SetIndexDrawBegin(0,Bars-CountBars);
SetIndexDrawBegin(1,Bars-CountBars);
int i,shift,counted_bars=IndicatorCounted();
//---- check for possible errorsif(counted_bars<0) return(-1);
//---- initial zeroif(counted_bars<1)
{
for(i=1;i<=CountBars;i++) val1[CountBars-i]=0.0;
for(i=1;i<=CountBars;i++) val2[CountBars-i]=0.0;
}
for (shift = CountBars; shift>=0; shift--)
{
b4plusdi=iADX(NULL,0,ADXbars,PRICE_CLOSE,MODE_PLUSDI,shift-1);
nowplusdi=iADX(NULL,0,ADXbars,PRICE_CLOSE,MODE_PLUSDI,shift);
b4minusdi=iADX(NULL,0,ADXbars,PRICE_CLOSE,MODE_MINUSDI,shift-1);
nowminusdi=iADX(NULL,0,ADXbars,PRICE_CLOSE,MODE_MINUSDI,shift);
if (b4plusdi>b4minusdi && nowplusdi<nowminusdi && i!=1)
{
val1[shift]=Low[shift]-5*Point;
Alert("Buy Arrow","\n","Current time is ",TimeToStr(CurTime()),"\n",Symbol());
i++;
}
if (b4plusdi<b4minusdi && nowplusdi>nowminusdi && i!=1)
{
val2[shift]=High[shift]+5*Point;
Alert("Sell Arrow","\n","Current time is ",TimeToStr(CurTime()),"\n",Symbol());
i++;
}
}
return(0);
}
//+------------------------------------------------------------------+
Thank you very much ! It worked, but rarely, sometimes the same error occurs - 130....... ( Do I always have to normalise stops or only on indices ? (just on currency pairs stops have always worked without normalisation, in my opinion).
Add to the code:
and analyse.
artemida70, I have a problem with testing an EA. I need to delete the old history, which is in the history folder in the terminal directory. I don't know how to enter the terminal directory, I have tried all the icons and nowhere have I found what I am looking for. I haven't had to delete historical data yet. Probably there are several files in the history folder, if so which one contains the historical data? I don't want to cause any extra problems. Also, if you don't mind, I don't have a stabilizer on my computer and had a power failure today. I switch the terminal on and the status bar and toolbars have disappeared on the screen. I switched them back on, but after switching the terminal off, they disappeared again. I know I did this once before and I found in the user manual how to reset it, but now I can not do it again, I have to read everything once again. You're welcome. :)
coronel, artmedia70, thank you very much for your answers and additions.
It turns out I have a problem not with the code, but with something else (probably already with my head :-))). I don't have any of the scripts working, although any of the EAs are working. I started attaching to the chart all the scripts I found in my MT4, and none of them works - for example, script close (copyright metaquotes), script ByMarketBuySymbols (copyright KimIV) and others. They all log loaded successfully, and then immediately removed. Button "Expert Advisors" is enabled. I have not checked one terminal, but two - Life and Fx4U. I have tried both of them, they may not both be glitchy. What to do? How do I make the scripts work?
Moved from a separate thread.
anastar88 10.02.2011 13:28
Hello, in this EA the alerts pop up every 5-10 sec. and I need only on M30 trading signals, which are marked with green and red dots on the charts. can someone help me? Thank you.
ADXpCrossingqw_Alerts.mq4 (2.47 KB)
XP? If so, just wait a while. I'll post a new one soon.
It works on Vista and 7. Not all XP doesn't work. On some it's fine.
================
Posted. Will be in the piggy bank tomorrow or the day after.
Yes - XP.
Wrote an excellent "expert" robot (there's no other way to put it but in inverted commas).
It takes into account all the latest developments of the MQL-community.
It opens positions perfectly - there is nothing to complain about.
Stop Losses work flawlessly!!! )))
But he doesn't want to pay the owner...bitch...)))
What causes this error?
2011.02.10 13:10:54 EURCHF,M1: Alert: Error OrderClose4063
What causes this error, please?
Find where this error is coming from, look carefully. It must be an integer (integer) number.
Perhaps you are using a double or string... This is only as an option. It could be something else too.
Do a search.
Error code: " parameter of type integer is pending ".
Thank you. And that's why I don't understand it right away,
if (OrdersTotal( ) !=0) {
OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES );
OrderClose( ticket, Lots, Ask, 5, 0 );
And my ticket is exactly a doublet, not an integer!!!!