| New signals service! | |
|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack (2) | Thread Tools | Display Modes |
|
|||
|
Quote:
|
|
|||
|
Quote:
sorry.. i think the error is displayed in Expert window rite? And this is what I got after renaming the Error from 1 - 5... error.GIF Last edited by ableze_joepardy; 03-31-2008 at 09:47 PM. |
|
|||
|
Quote:
So hit ctrl-O, then tab "Expert Avisors" and select "Allow live trading" BTW, renaming the variables will not erase the possibility of false information, you also need to check the error after each OrderSend() call and before the next one. Last edited by Michel; 03-31-2008 at 10:29 PM. |
|
|||
|
owh thank you michel..
btw.. got another question.. ive also modified the mt4 default script to check if any trades opened using script above reach +10 pips.. If got any then close all 5 orders.. example.. Trade 1 lost Trade 2 lost Trade 3 +10 pips Trade 4 Pending Trade 5 Pending then close all trades n delete all pending orders with magic no. 770.. can u please check whether the script below will do the job as planne? ![]() Code:
//+------------------------------------------------------------------+
//| AutoClose Same Magic.mq4 |
//| Copyright © 2008, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2008, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
int cnt;
double CurrentProfit;
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
void CloseAllOrders(double MN) {
bool result;
double price;
int cmd,error;
while (OrdersTotal() > 0) {
// Loop through all orders and close them
for (int i = (OrdersTotal() - 1); i >= 0; i--) {
if (OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) {
if (OrderMagicNumber() == MN) {
cmd = OrderType();
if (cmd == OP_BUY) {
OrderClose(OrderTicket(),OrderLots(),Bid,3,CLR_NONE);
}
else if (cmd != OP_BUY && cmd != OP_SELL) {
OrderDelete(OrderTicket());
}
}
}
}
}
}
int start()
{
//----
for(cnt=OrdersTotal();cnt>=0;cnt--)
{
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
if( OrderMagicNumber()==770 )
{
if(OrderType()==OP_BUY)
{
CurrentProfit=Bid-OrderOpenPrice() ;
if(CurrentProfit>10*Point)
{
CloseAllOrders(770);
}
}
}
}
//----
return(0);
}
//+------------------------------------------------------------------+
|
|
|||
|
Quote:
|
|
|||
|
EA building for dummies
I just noticed this thread after I posted a new one....I think this would be a snap for some of you guys.....
EA building 101 question Need Help please! I searched for an answer in advance but couldnt come up with much. Any ideas? Thank you! |
|
|||
|
RSI = 5;
How do I find the number of the most recent bar back of the RSI that has the highest RSI and is also above 75, likewise the most number of the recent bar back of RSI that has the lowest RSI which is also below RSI of 25? This has me puzzled! Can you help with the statement to solve this?? Much appreciation in advance for your time and effort! Dave |
|
||||
|
Quote:
Code:
Lowest_RSI=MathMin(Lowest_RSI,iRSI(NULL,0,Periods,MODE,i));
Highest_RSI=MathMax(Highest_RSI,iRSI(NULL,0,Periods,MODE,i));
__________________
|
![]() |
| Bookmarks |
| Tags |
| histogram, forex, ZUP_v1.mq4 |
| Thread Tools | |
| Display Modes | |
|
|
LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/questions/270-ask.html
|
||||
| Posted By | For | Type | Date | |
| OzFx System:) - Page 639 | This thread | Refback | 06-21-2008 10:53 PM | |
| Forex SRDC Sidus Sibkis EA MT4 Forum OTCSmart | This thread | Refback | 12-08-2007 12:46 PM | |