molanis.com/forum - Tools for MetaTrader : The place to ask about the best expert advisor builder, expert advisor downloads, and expert advisor programming

AFTER YOU REGISTER SEND US AN EMAIL TO ACTIVATE YOUR ACCOUNT - Before posting:-1- Please read the user guide -2- Try the examples -3- Search in the forum
It is currently Mon May 20, 2024 3:47 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Control of Free Margin
PostPosted: Tue Nov 01, 2011 10:55 am 
Offline

Joined: Thu Oct 27, 2011 12:41 pm
Posts: 59
I know how to use MaxPercentAtRisk and/or the Martingale already. Thank you so much for taking your time explaining it to me. Now comes the question of MaximumNoOfLots.

When suppossedly my TA condition hits, and a Long trade position is entered by the EA I know my free margin reduces a little according to the MaxPercentAtRisk that I set.

If supposedly I set my MaximumNoOfLots = 100, and the TA condition IS STILL VALID, another Long trade position is entered by the EA and my Free Margin reduces somemore and my Lot Size is also slightly smaller due to the relatively smaller Equity. I have 2 positions now.

Supposedly the TA condition is still valid, another Long trade position is entered and ...... bla bla bla . I have 3 positions now. And so on till I have 'x' number of lots and my Free Margin is exhausted ' Not Enough Money' comes out. Yeaps my real account has been WIPED OUT many times already even then when i was trading manually and had the chance to control. If I don't learn how to control my EA the same thing might happen again.

QUESTION - How do I control (the Free Margin) so that all trading halts when a certain level of Free Margin is left? The manual way is to count (positions/lotsizing) all your stop losses and determine the worst case scenario. Is there a way to control this from the EA side?


Top
 Profile  
 
 Post subject: Re: Control of Free Margin
PostPosted: Tue Nov 01, 2011 1:39 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
The ea wil show you an alert if you don't have enough money to trade (it won't send the order to the server). However, there is no way to set a level the way you want.


Top
 Profile  
 
 Post subject: Re: Control of Free Margin
PostPosted: Wed Nov 02, 2011 5:15 am 
Offline

Joined: Thu Oct 27, 2011 12:41 pm
Posts: 59
molanisfx wrote:
The ea wil show you an alert if you don't have enough money to trade (it won't send the order to the server). However, there is no way to set a level the way you want.




So I guess the best way is still to total your SL to reach the 'halt' mark on the Equity.
Thank you so much!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by Molanis © 2009