Forex



Go Back   Forex Trading > Downloads > Expert Advisors - Metatrader 4
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
  #1 (permalink)  
Old 12-17-2006, 02:36 PM
babarmughal's Avatar
Senior Member
 
Join Date: Apr 2006
Posts: 315
babarmughal is on a distinguished road
Smile If the current day equity is more than the repvious equity

Hi Guys,

I wonder if there is a possible way to modify an EA that if the current day equity is more than the previous day then stop trading for the rest of the day and start trading next day...

Can someone please post the script here..

Thanks
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
  #2 (permalink)  
Old 12-17-2006, 05:41 PM
babarmughal's Avatar
Senior Member
 
Join Date: Apr 2006
Posts: 315
babarmughal is on a distinguished road
Anyone who can help please....

Thanks
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
  #3 (permalink)  
Old 12-17-2006, 06:54 PM
Senior Member
 
Join Date: Dec 2005
Posts: 142
trevman is on a distinguished road
dont know the code myself but if you store current equity in a variable, then open orders, then check the equity when the order is closed against the provious recorded. same thing with date, but if it equals it.

this seems silly to me though since the market is 24/7, surely if your winning you want to stay in? if you could explain please, im curious about your reasons.
__________________
There is no candle.
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
  #4 (permalink)  
Old 12-17-2006, 09:37 PM
babarmughal's Avatar
Senior Member
 
Join Date: Apr 2006
Posts: 315
babarmughal is on a distinguished road
Smile

Quote:
Originally Posted by trevman
dont know the code myself but if you store current equity in a variable, then open orders, then check the equity when the order is closed against the provious recorded. same thing with date, but if it equals it.

this seems silly to me though since the market is 24/7, surely if your winning you want to stay in? if you could explain please, im curious about your reasons.
Well i want to stop trading for the day once my current equity is more then the previous equity...doesnt matter more by how much even if it is up by 10 pips.....its the 1st step towards a new way of increasing you balance i nthe account..

Thanks
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
  #5 (permalink)  
Old 12-17-2006, 10:50 PM
Senior Member
 
Join Date: Jan 2006
Posts: 1,119
omelette is on a distinguished road
PHP Code:
if (TimeDay(Time[0]) > TimeDay(OldTime) + || TimeDay(OldTime) - TimeDay(Time[0]) > 2) { 
 
OldTime OldTime 86400
 
OldEquity AccountEquity(); } 
  
if (
TimeDay(Time[0]) == TimeDay(OldTime) + || TimeDay(OldTime) - TimeDay(Time[0]) > 2
 if (
AccountEquity() > OldEquity
  return; 
Hi. I think something along these lines is what you're looking for (haven't tried it though...). Variable 'OldTime' is of type Global, datetime. 'OldEquity' is type Global, double.

Last edited by omelette; 12-18-2006 at 02:57 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
  #6 (permalink)  
Old 12-18-2006, 12:09 AM
babarmughal's Avatar
Senior Member
 
Join Date: Apr 2006
Posts: 315
babarmughal is on a distinguished road
Thumbs up

Quote:
Originally Posted by omelette
PHP Code:
if (TimeDay(Time[0]) > TimeDay(OldTime) + || TimeDay(OldTime) - TimeDay(Time[0]) > 2) {
 
OldTime OldTime 86400;
 
OldEquity AccountEquity(); }
 
if (
TimeDay(Time[0]) == TimeDay(OldTime) + || TimeDay(OldTime) - TimeDay(Time[0]) > 2)
 if (
AccountEquity() > OldEquity)
  return; 
Hi. I think something along these lines is what you're looking for (haven't tried it though...). Variable 'OldTime' is of type Global, datetime. 'OldEquity' is type Global, double.
thanks for your script but will this stop all the trades for the rest of the day...?
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
  #7 (permalink)  
Old 12-18-2006, 12:48 AM
Senior Member
 
Join Date: Jan 2006
Posts: 1,119
omelette is on a distinguished road
This is not a script, just two lines of code that need to be inserted into your EAs code - I assumed you were coding up a strategy........
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


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
Equity EA Mr.Marketz Expert Advisors - Metatrader 4 14 09-13-2009 10:07 PM
Equity and Balance MadAero Metatrader 4 8 10-13-2008 02:12 AM


All times are GMT. The time now is 03:37 PM.



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