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
hello whroeder..
sometimes work well in month august, but error in march or other month...
so i change my normalize code to your coding..
OrderSend(... Slippage.Pips * pips2points, Bid - StopLossPips * pips2dbl
i change some ordersend code, but not work well:
1. ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Ask - StopLose * pips2dbl,Ask+TakeProfit * pips2dbl,0,Green) ;
2. ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3* pips2points,Ask-StopLose*pips2dbl,Ask+TakeProfit*pips2dbl,0,Green) ;
not all position opened,
some position get error 4107 and invalid price..
what should i change?
thx..
hello whroeder..
some position get error 4107 and invalid price..
what should i change?
Without seeing all the code, impossible to know. Are you returning from Start. Do you have RefreshRate() between each server call.
ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3* pips2points,Ask-StopLose*pips2dbl,Ask+TakeProfit*pips2dbl,0,Green) ;
oh.. i am not have refreshrate()..
i never see that in other ea..
my ea code like this after using your code:
extern double TakeProfit = 50;
extern double StopLose = 40;
extern double Lots = 0.1;
double pips2points, pips2dbl;
int Digits.pips;
double
Pip;
//+------------------------------------------------------------------+
int init(){
if (Digits == 5 || Digits == 3){
pips2dbl = Point*10;
pips2points = 10;
Digits.pips = 1;
}
else {
pips2dbl = Point;
pips2points = 1;
Digits.pips = 0; }
}
//+------------------------------------------------------------------+
int start()
{
int total, ticket;
if(New_Bar()){
if((Open[2]>Close[2]) && (Open[1]>Close[1])){
ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3* pips2points,Ask-StopLose*pips2dbl,Ask+TakeProfit*pips2dbl,0,Green) ;
}
}
return(0);
}
//+------------------------------------------------------------------+
bool New_Bar()
{
static datetime New_Time=0;
if(New_Time!=Time[0]){
New_Time=Time[0];
return(true);
}
return(false);
}
i saw many ea using "Ask" if want to doing buy..
and "Bid" for sell..
i think, maybe in ordersend that have wrong...
so what should i do?
thx..
oh.. i am not have refreshrate()..
i never see that in other ea..
You've been asked, TWICE
oh... sory.. the src is in here..
yesterday i think u ask me to select src in metatrader, so not found..
hehe.. so now, just to know it's in this message box...
hehe.
hello roeder..
i am using this code again:
int init()
{
Pip = Point;
if(Digits==3||Digits==5)Pip*=10;
TakeProfit *= Pip;
StopLose *= Pip;
}
ticket=OrderSend(Symbol(),OP_BUY,Lots,NormalizeDouble(Ask,4),3,NormalizeDouble(Ask-StopLose,Digits),NormalizeDouble(Ask+TakeProfit,Digits),0,Green) ;suddendly can work again from 1 jan 2010- sept 2010..
maybe open position based of custom indicator that make the problem..
because must using buffer ya, i still not undestand about buffer..
so i must many try..
do u know where the link that teach about custom indicator that using many formula, then put to expert advisor?
example indicator using high formula like pivot multiframe...
thx..