Forex



Go Back   Forex Trading > Programming > MetaTrader
Forex Forum Register More recent 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
  #501 (permalink)  
Old 11-10-2008, 05:43 PM
Senior Member
 
Join Date: Oct 2008
Location: Vancouver, BC
Posts: 159
Roger09 is on a distinguished road
Quote:
Originally Posted by FerruFx View Post
Is there a function in mql to move the order ???

Will test it asap next week

FerruFx
My fault , I ment ObjectMove
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
  #502 (permalink)  
Old 11-10-2008, 05:54 PM
Senior Member
 
Join Date: Oct 2008
Location: Vancouver, BC
Posts: 159
Roger09 is on a distinguished road
Quote:
Originally Posted by Beno View Post
I have found this in the money management tread what need to be done to it to make it work in real time.

Any help would be great.


Cheers

Beno
Very weird code. What do you expect?
What is mWinRate?
Why MathRound(CountWins/OrdersHistoryTotal())*10 ?
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
  #503 (permalink)  
Old 11-10-2008, 06:03 PM
Senior Member
 
Join Date: Oct 2008
Location: Vancouver, BC
Posts: 159
Roger09 is on a distinguished road
Quote:
Originally Posted by fracte View Post
hello !

I am learing how to make an EA,
but it does not work...

can you help me?
Could you see smile face in your chart? I mean Is your EA allowed?
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
  #504 (permalink)  
Old 11-12-2008, 08:01 PM
Junior Member
 
Join Date: Nov 2008
Posts: 1
tural is on a distinguished road
MultiPositionExpert

Quote:
Originally Posted by luxinterior View Post
The attached EA has the functionality you're looking for. You should be able to figure it out from that and implement it in your own EA's

Good luck

Lux
Hi ,

I wonder how can I edit multipositionexpert when my profit reachs 100, to close all my orders.

Thanks in advance,
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
  #505 (permalink)  
Old 11-12-2008, 11:38 PM
Senior Member
 
Join Date: Nov 2006
Posts: 308
luxinterior is on a distinguished road
Just loop through all your open orders, calculate the profit then when it reaches or exceeds your target close them.

I'm assuming you know something about programming of course. If not take a look at the code in a few EA's and see if you can follow what's going on. Also take a look at the help file in Meta Editor. Look at the OrderProfit( ) function.

Good luck

Lux
__________________
Build An Expert Advisor. FREE E-course As Seen On TV
ForexArea.com
Users of Gap Trader from 'Forex-Assistant' MUST Read This
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
  #506 (permalink)  
Old 11-24-2008, 05:49 PM
necktiekid's Avatar
Junior Member
 
Join Date: Nov 2008
Posts: 2
necktiekid is on a distinguished road
Need Help coding short entry

I am looking for help coding this entry criteria for short entry. These are the conditions:

If High >= Highest High (20 bars) And RSI (Close , 8 , False) < Highest (RSI (Close , 8 , False) , 20 bars) And StochK (8 , 5) < 90 And StochK (8 , 5) < StochD (8 , 5 , 3) And RSI (AvgHL , 40 , False) > 60 And StochD (8 , 5 , 3) > 87
then sell next bar at market

I am new to building expert Advisors. I am working with TradeSense. Can you have multiple entry conditions and multiple exit strategies in the same trade system?

Thanks for your help.
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
  #507 (permalink)  
Old 11-25-2008, 03:52 AM
MANSTIR's Avatar
Senior Member
 
Join Date: Nov 2007
Posts: 162
MANSTIR is on a distinguished road
Quote:
Originally Posted by Beno View Post
I have found this in the money management tread what need to be done to it to make it work in real time.

Any help would be great.


Cheers

Beno

Code:
double WinRate()
{
double Ticket;
double CountWins = 0;

for(Ticket=0;Ticket<OrdersTotal();Ticket++)
{
OrderSelect(Ticket,SELECT_BY_TICKET,MODE_HISTORY);
if(MyAccount==AccountNumber() && OrderSymbol()==Symbol() && OrderMagicNumber() == MagicNumber)
{
//------>>>>
if(OrderType()==OP_BUY)
{
if(OrderClosePrice() >= OrderOpenPrice())
CountWins++;
}
else if(OrderType()==OP_SELL)
{
if(OrderClosePrice() <= OrderOpenPrice())
CountWins++;
}
}
}
if(CountWins > 0)
return(MathRound(CountWins/OrdersHistoryTotal())*10);
else
Print("Real Time WinRate not Available");
return(mWinRate);
}

hmmm seem interesting Beno, do u already try it out...?

regards,

MANSTIR
Attached Files
File Type: mq4 Kelly2.mq4 (5.2 KB, 27 views)

Last edited by MANSTIR; 11-25-2008 at 05:30 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
  #508 (permalink)  
Old 11-26-2008, 03:48 PM
Junior Member
 
Join Date: Nov 2008
Posts: 1
myke is on a distinguished road
Thumbs up i need help to code a custom indicator into an ea

hi i am new, but i am not knew to fx trading,but i hav an indicator that is doing wonders,but i want to code it into an ea,i need help
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
  #509 (permalink)  
Old 11-27-2008, 01:20 AM
MANSTIR's Avatar
Senior Member
 
Join Date: Nov 2007
Posts: 162
MANSTIR is on a distinguished road
Quote:
Originally Posted by tural View Post
Hi ,

I wonder how can I edit multipositionexpert when my profit reachs 100, to close all my orders.

Thanks in advance,
Quote:
extern bool MaxProfit = True;
extern int MaxProfitPoint = 100;

int start() {
int i,type,err;
double price;
bool result;
//--

if (MaxProfit == TRUE){

if (Day()|| AccountProfit() >= MaxProfitPoint) {

for(i=OrdersTotal()-1;i>=0;i--)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
{
type=OrderType();
if(type==OP_BUY || type==OP_SELL)
{
while(true)
{
if(type==OP_BUY) price=MarketInfo(OrderSymbol(),MODE_BID);
else price=MarketInfo(OrderSymbol(),MODE_ASK);
result=OrderClose(OrderTicket(),OrderLots(),price, Slippage,CLR_NONE);
if(result!=true) {err=GetLastError(); Print("LastError = ",err);}
else err=0;
if(err==135) RefreshRates();
else break;
} } }
else Print( "When selecting a trade, error ",GetLastError()," occurred");
}
}

return(0);
}
this is for close all if reach your desire profit..make a wish...

regards,

MANSTIR
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
  #510 (permalink)  
Old 11-27-2008, 04:29 AM
matrixebiz's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 1,218
matrixebiz is on a distinguished road
Quote:
Originally Posted by myke View Post
hi i am new, but i am not knew to fx trading,but i hav an indicator that is doing wonders,but i want to code it into an ea,i need help
Ok, post the Indicator or PM me and I'll look at an EA for it. What are the rules for signals? and how long have you been testing 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
automated close order, close, eas, forex, learn mql4, learn mql4 video, learning mql4, mini std lotsize risk, mql4 ima, mql4 learning, mql4 video, OrderCloseBy, profit, reach, secure profit function, T101_v1.11_orest_IBFXm.mq4


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
Learning Cycles For New Traders Dan7974 General Discussion 350 01-18-2008 07:04 PM
Learning to code for autotrading GoatT MetaTrader 8 01-10-2007 09:55 PM
Self learning expert mrtools Expert Advisors - Metatrader 4 32 10-22-2006 06:29 PM


All times are GMT. The time now is 05:24 AM.



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