Forex



Go Back   Forex Trading > Downloads > Tools and utilities
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
  #121 (permalink)  
Old 04-08-2008, 01:43 AM
Linuxser's Avatar
User Root
 
Join Date: May 2006
Location: Helliconia (Winter)
Posts: 4,410
Blog Entries: 56
Linuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond repute
Quote:
Originally Posted by WNW View Post
These great scripts are courtesy of smjones at ForexFactory.
I took the liberty of renaming them.
Thank you WNW
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
  #122 (permalink)  
Old 04-11-2008, 02:31 PM
Administrator
 
Join Date: Sep 2005
Posts: 20,079
Blog Entries: 241
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
I found some interesting indicator.
Author is KimIV.
It is his website.

i-SignalOfTrade indicator.
Download from here (WinRar archive).

This indicator will signal to you about any trading events on your account: open the order, modify the order, hit stop loss or take profit, and so on. Just anything.
It will signal you by the following ways:

UseAlert=True - by alert in the window.
UseComment=True - comments on the chart.
UsePrint=False - write in log file.
UseSendMail=False - by email.
UseSound=True - by sound

12s.jpg

12s1.jpg

12s2.jpg

12s3.jpg
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
  #123 (permalink)  
Old 04-13-2008, 01:08 AM
matrixebiz's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 1,218
matrixebiz is on a distinguished road
EA to close all orders

I've seen EA/Scripts that close all open orders but I'm looking for and EA to close all open orders at a specified time. Anyone have an EA like this?
or can someone show me what code to change on an EA that opens orders to add code to close and order.

Thank you

EDIT: if anyone has an EA that Opens an order at a specified time then closes the order at another time can someone post here please.

Last edited by matrixebiz; 04-13-2008 at 02:12 AM.
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
  #124 (permalink)  
Old 04-13-2008, 09:44 AM
Badguy's Avatar
Member
 
Join Date: Jan 2006
Posts: 61
Badguy is on a distinguished road
Only Open at specified time

Hi matrixbiz

this EA open trades at specified time, but not close at specified time.

I'm looking for the same code ( close all orders at specified time ) to built in exist EA's.

May be this help



Quote:
Originally Posted by matrixebiz View Post
I've seen EA/Scripts that close all open orders but I'm looking for and EA to close all open orders at a specified time. Anyone have an EA like this?
or can someone show me what code to change on an EA that opens orders to add code to close and order.

Thank you

EDIT: if anyone has an EA that Opens an order at a specified time then closes the order at another time can someone post here please.
Attached Files
File Type: mq4 e-OpenByTime.mq4 (11.0 KB, 85 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
  #125 (permalink)  
Old 04-13-2008, 02:00 PM
Badguy's Avatar
Member
 
Join Date: Jan 2006
Posts: 61
Badguy is on a distinguished road
Hi Coders

I'm still learning by copy and past, because I'm a totally newbie.

I need a function thats close all open trades at specified time.
I have try something.
Don't have any errors with compile. But with strategytester I have follow message:
Testgenerator: unmatched data error(volume limit 719 at 2008.03.27 12:30 exeeded
Testgenerator: unmatched data error(volume limit 135 at 2008.03.27 23:00 exeeded



Black thats the original code. That works
Blue thats what i i like to insert

Thanks for any help

//+-----------------------------------------------------------------------+
//| Check for close order conditions |
//+-----------------------------------------------------------------------+
void CheckForCloseConditions()
{
int ticket;

for(int i=0;i<OrdersTotal();i++)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false ) break;
if(OrderMagicNumber()!=MAGICMA || OrderSymbol()!=Symbol()) continue;
if(OrderType()==OP_BUY)
{
if (GetSignal()==1)
{

OrderClose(OrderTicket(),OrderLots(),Bid,3,Red);
return(0);
}



}
if(OrderType()==OP_SELL)
{

if (GetSignal()==2)
{
OrderClose(OrderTicket(),OrderLots(),Ask,3,Red);
return(0);
}


}
}
return(0);
}

//+-----------------------------------------------------------------------+
//| Check for close order conditions trailing |
//+-----------------------------------------------------------------------+
void CheckForCloseConditionsTrailing()
{
int ticket;

for(int i=0;i<OrdersTotal();i++)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false ) break;
if(OrderMagicNumber()!=MAGICMA_Trailing || OrderSymbol()!=Symbol()) continue;
if(OrderType()==OP_BUY)
{
if (GetSignal()==1)
{
OrderClose(OrderTicket(),OrderLots(),Bid,3,Red);
return(0);
}

if(TrailingStop>0)
{
if(Bid-OrderOpenPrice()>Point*TrailingStop)
{
if(OrderStopLoss()<Bid-Point*TrailingStop)
{
OrderModify(OrderTicket(),OrderOpenPrice(),Bid-Point*TrailingStop,OrderTakeProfit(),0,Red);
return(0);
}
}
}


}
if(OrderType()==OP_SELL)
{

if (GetSignal()==2)
{
OrderClose(OrderTicket(),OrderLots(),Ask,3,Red);
return(0);
}

if(TrailingStop>0)
{
if((OrderOpenPrice()-Ask)>(Point*TrailingStop))
{
if((OrderStopLoss()>(Ask+Point*TrailingStop)) || (OrderStopLoss()==0))
{
OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Poi nt*TrailingStop,OrderTakeProfit(),0,Magenta);
return(0);
}
}
}

}
}
return(0);
}

//+-----------------------------------------------------------------------+
//| Start function |
//+-----------------------------------------------------------------------+

int start()


//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXX

//Close Open Orders by Time

//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX

if (UseCloseTime){
if (!(Hour()>=CloseTime && Hour()>=CloseTime)) {
Comment("Time for close trade has come !");
return(0);
} else Comment("");
}else Comment("");


{
int ticket;

for(int i=0;i<OrdersTotal();i++)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false ) break;
if(OrderMagicNumber()!=MAGICMA || OrderSymbol()!=Symbol()) continue;
if(OrderType()==OP_BUY)
{
{

OrderClose(OrderTicket(),OrderLots(),Bid,3,Red);
return(0);
}



}
if(OrderType()==OP_SELL)
{

{
OrderClose(OrderTicket(),OrderLots(),Ask,3,Red);
return(0);
}


}
}
return(0);
}

//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX

//Close Open Trailing Orders by Time

//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX


if (UseCloseTime){
if (!(Hour()>=CloseTime && Hour()>=CloseTime)) {
Comment("Time for close trailing trade has come !");
return(0);
} else Comment("");
}else Comment("");




{
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false ) //break;
if(OrderMagicNumber()!=MAGICMA_Trailing || OrderSymbol()!=Symbol()) //continue;
if(OrderType()==OP_BUY)
{
// if (GetSignal()==1)
{
OrderClose(OrderTicket(),OrderLots(),Bid,3,Red);
return(0);
}

if(TrailingStop>0)
{
if(Bid-OrderOpenPrice()>Point*TrailingStop)
{
if(OrderStopLoss()<Bid-Point*TrailingStop)
{
OrderModify(OrderTicket(),OrderOpenPrice(),Bid-Point*TrailingStop,OrderTakeProfit(),0,Red);
return(0);
}
}
}


}
if(OrderType()==OP_SELL)
{

{
OrderClose(OrderTicket(),OrderLots(),Ask,3,Red);
return(0);
}

if(TrailingStop>0)
{
if((OrderOpenPrice()-Ask)>(Point*TrailingStop))
{
if((OrderStopLoss()>(Ask+Point*TrailingStop)) || (OrderStopLoss()==0))
{
OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Poi nt*TrailingStop,OrderTakeProfit(),0,Magenta);
return(0);
}
}
}

}
}
return(0);



if(CalculateNumberOfOrders(Symbol())<1&&CalculateN umberOfOrdersTrailing(Symbol())<1)
CheckForOpenConditions();
else
{
CheckForCloseConditions();
CheckForCloseConditionsTrailing();
}


return(0);

}

Last edited by newdigital; 04-13-2008 at 02:21 PM.
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
  #126 (permalink)  
Old 04-13-2008, 02:23 PM
matrixebiz's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 1,218
matrixebiz is on a distinguished road
How do you fix a "'CloseHour' - expression on global scope not allowed" error?
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
  #127 (permalink)  
Old 04-13-2008, 04:56 PM
Badguy's Avatar
Member
 
Join Date: Jan 2006
Posts: 61
Badguy is on a distinguished road
Global variables?

hi matrixbiz

What's mean with "global scope"? The variables in begin of script to define the parameters of indicators ect?

See attached # 1EA_Test_Template. I need this to test function of scripts.

Let it run in strategytester and it works.
Open Ea with MetaEditor and activate the inactive script after int start()
Now compile and let it run in strategytester, the EA don't trade. See the error message in journal.

Quote:
Originally Posted by matrixebiz View Post
How do you fix a "'CloseHour' - expression on global scope not allowed" error?
Attached Files
File Type: mq4 # 1EA_Test_Template v1.mq4 (12.2 KB, 40 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
  #128 (permalink)  
Old 04-14-2008, 08:51 AM
BigBaloo's Avatar
Member
 
Join Date: Nov 2007
Location: White Water BC
Posts: 66
BigBaloo is on a distinguished road
Scripts & Include file help

Quote:
Originally Posted by Dimicr View Post
They send orders very sure!
Do script & Include files need to be compiled?
If so, do they need the full works, or can they be treated the same as an exe file? (Down load/Close Metatrader/Re-open)
Thanks guys
__________________
It ain't the length of the trend, it's what you do with it!
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
  #129 (permalink)  
Old 04-15-2008, 03:43 PM
BigBaloo's Avatar
Member
 
Join Date: Nov 2007
Location: White Water BC
Posts: 66
BigBaloo is on a distinguished road
Help with this EA

Hi,
Any kind Coder like to add a Breakeven option to this Indicator?
Blessings, & kind thoughts always with you!
Thanks
Attached Files
File Type: mq4 e-OpenByTime.mq4 (16.9 KB, 48 views)
__________________
It ain't the length of the trend, it's what you do with it!
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
  #130 (permalink)  
Old 04-15-2008, 06:24 PM
Beno's Avatar
Senior Member
 
Join Date: Aug 2006
Location: London
Posts: 516
Beno is on a distinguished road
I do not know the language that is on KimIV. site but I managed to find the right file to down load but when I compile it there is an error

'GetParent' - function is not defined C:\Program Files\Straighthold Trader\experts\e-CloseByPercentProfit.mq4 (180, 10)

Could some one please let him know or fix it if they have it
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

Tags
close, close all, Close all open positions.mq4, close all position script, close all positions, close all positions in MT4, close all script, close all trades, closeall, ddetool, forex, mt4 close all script, mt4 close all trades, open close, pending order ea, profit, script, scripts, stomper, stop, tools, trades, trailing


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
Open/close trade on same bar's close? WNW Expert Advisors - Metatrader 4 2 03-29-2007 06:37 AM
close all open trades ea G-Riper General Discussion 2 08-02-2006 10:41 PM
Close all open positions jonjonau Expert Advisors - Metatrader 4 6 07-12-2006 06:01 AM
Close All Open Positions? lonespruce Metatrader 4 9 06-22-2006 08:20 AM


All times are GMT. The time now is 10:21 PM.



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