Forex
Google

Go Back   Forex Trading > Discussion Areas > 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 02-06-2006, 09:17 AM
Willis11of12's Avatar
Willis11of12 Willis11of12 is offline
Senior Member
 
Join Date: Dec 2005
Posts: 105
Willis11of12 is on a distinguished road
Increasing lots with EA

I've been using a peice of code that Trevman posted a while back to increase your lots as your balance grows and it works well! However, I'm hoping to find a way to add something to it that would keep it from decreasing the number of lots as the account balance goes down. For example, something that would look at the code Trevman posted and also looking at the number of lots on the previous order and use the larger of the two. I'm only a beginner trying to learn here, so any help will be greatly appreciated!
Here's the code I have now:
double Lots = NormalizeDouble(AccountFreeMargin()/(500/0.1),1);
Thanks again for the help! =)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-28-2006, 01:23 PM
Willis11of12's Avatar
Willis11of12 Willis11of12 is offline
Senior Member
 
Join Date: Dec 2005
Posts: 105
Willis11of12 is on a distinguished road
Wink Here it is!

I figured out how to do this a while back and thought that I had posted it, but I guess maybe I didn't. In case anyone else out there was looking for the same thing that I was, here it is!

double Lots2 = OrderLots();
double Lots = NormalizeDouble(AccountBalance()/(1000/0.1),1);
if (Lots<Lots2) Lots = Lots2;
{
if (Lots>100) Lots = 100;
}

Using this will increase your leverage as your balance goes up, but won't ever lower your leverage when you have a bad trade, which I think is a much better way to increase your lots. if you want to adjust the leverage, only change the part that is now set at 1000. If you want it more volital, use a smaller number, or a larger number for less volital results. right now it is set for 10:1 leverage on a standerd account, so if you are using a mini account, you'll want to just put in 100 instead of 1000 for the same 10:1 leverage.

Happy trading!
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
Lots of $$ and lots of potential... dukeofdents Suggestions for Trading Systems 5 04-08-2007 02:19 AM
Change Lots hellkas Questions 5 10-08-2006 06:11 PM
Automated increasing of lots in EA forexfordinner Metatrader 4 7 09-05-2006 02:45 AM
How i calculate lots? DooMGuarD Questions 4 05-29-2006 09:12 PM
Multi-Lots Eric Expert Advisors - Metatrader 4 14 03-31-2006 11:05 PM


All times are GMT. The time now is 08:39 AM.