Forex
Google

Go Back   Forex Trading > Downloads > Expert Advisors - Metatrader 4
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


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

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-17-2006, 01:36 PM
babarmughal's Avatar
babarmughal babarmughal is offline
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!
Reply With Quote
  #2 (permalink)  
Old 12-17-2006, 04:41 PM
babarmughal's Avatar
babarmughal babarmughal is offline
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!
Reply With Quote
  #3 (permalink)  
Old 12-17-2006, 05:54 PM
trevman trevman is offline
Senior Member
 
Join Date: Dec 2005
Posts: 144
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!
Reply With Quote
  #4 (permalink)  
Old 12-17-2006, 08:37 PM
babarmughal's Avatar
babarmughal babarmughal is offline
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!
Reply With Quote
  #5 (permalink)  
Old 12-17-2006, 09:50 PM
omelette omelette is offline
Senior Member
 
Join Date: Jan 2006
Posts: 1,027
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 01:57 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 12-17-2006, 11:09 PM
babarmughal's Avatar
babarmughal babarmughal is offline
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!
Reply With Quote
  #7 (permalink)  
Old 12-17-2006, 11:48 PM
omelette omelette is offline
Senior Member
 
Join Date: Jan 2006
Posts: 1,027
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!
Reply With Quote
Reply


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Equity EA Mr.Marketz Expert Advisors - Metatrader 4 12 07-03-2008 08:59 PM
Equity and Balance MadAero Metatrader 4 3 06-21-2008 10:10 PM


All times are GMT. The time now is 06:17 PM.