NuB Question: Make Demo Trades on a Live account ?

 

Rating: NuB

I'm trying to figure out a way how I can get an EA to stop opening more trades if it gets number of consecutive losses until it has closed a specified number of profitable trades in a rowagain. This applies to the account and not just a specific pair. I've noted that this occurs in numerous EAs, so it seems like a good Money Management aspect to include.

I haven't started coding this yet, I'm still trying to figure out the concept and method of how this could be done and the various factors involved.

Example: If three consecutive losing trades in a row close, it won't start opening new trades again until the account has two consecutive profitable trades close.

Though I don't (yet) know how to check for 3 losing trades in a row on the account, hopefully I can figure the concept, methodology and then the code to accomplish this aspect of it. But how can one check to see if it has 2 winning trades in a row if it isn't trading?

Also there is the aspect that even when 3 trades in a row close at a loss; what to do with the active ones that are already open? Close the active trades that are currently at a loss even if they haven't reached their StopLoss point? This doesn't seem like a good approach does it? IF I can figure out how to monitor when I get two new, non existent trades in a row closing at a profit again, I can see that a critical aspect of this is that this is based on time periods as opposed to other statistics from various indicators. So once three trades in a row close at a loss, there is the distinction between halting placing new trades, which was my original intent; as opposed to what is happening with other trades that are already open. Hmmmmm....??? So if their are still other trades open and active, I can cease placing any new trades until I get two pre-existing open trades closing in profit before I start opening new trades again. But what to do if there aren't any other trades already open after 3 in a row close at a loss? How can one monitor the outcome of trades that don't exist?

Thanks for any an all ideas as well as assistance on specific code of this 'time convoluted' problem.

 
FourX:

Though I don't (yet) know how to check for 3 losing trades in a row on the account, hopefully I can figure the concept, methodology and then the code to accomplish this aspect of it. But how can one check to see if it has 2 winning trades in a row if it isn't trading?

Technically you cant :P what you can do however is to make a condititions function that tells the EA whether you allow trading or not. When you dont (when you have for example 3 losses) make the EA not open trades, but send signals to an array where you store and check the "would-be-trades" and make them virtual. You can thus make your EA check the would-be-trades and when you have 2 positive, countinue with real trading.
 
The alternative that I have in my code is to reduce the lot size to a minimum until things improve. See TEF/lotsize
 
Yes but what if you're already using the minlot? :)
 

If you're already using minlot then you're trading on too large a timeframe with too large a SL for the size of your account.

If your account is $1000 and you want to risk 3% max per trade, with a 20 pip initial SL, your lot size should be 0.075 Still 7 times bigger than IBFX's minlot. $1000*0.03/20 pip/($20/pip/lot EurUsd)

 
Hm. thanks. I'll rework my position sizes once I get a long term stastic of my trading. THanks.
 

Had the same thought about cutting back to the very minimum, but that's where I am already at.

Thanks for the virtual scheme. Sounds like the sort of methodology I'm searching for.

What is really needed are accurate entrance strategies, which I say are more important than exit, which are relatively easy and straight forward in comparison. One has to have them both of course, but if one is opening up mostly losing trades, then it's going to be hard to make any profits regardless of how one gets out of the trades. Mostly just minimizing loses is going to bleed any account to death eventually.

You bring up a good point that is easy to lose sight of WR: long term winners at this are very conservative and don't get sucked into the 'overnight millionaire' hype. Having just a couple of percent in play at once is already a significant risk. As I was taught: if I ever have 5% in play, then it should be that very rare occasion that is a 'sure fire thing' with 100% confidence in it. Hard to come by in this game, especially when one doesn't have a solid track record of profitability to have any real trading confidence yet. Something that most NuBs don't grasp or forget about way to often. I know I do and get over leveraged far to often.

 
forexCoder:
Hm. thanks. I'll rework my position sizes once I get a long term stastic of my trading. THanks.

As I said: I'm already at the minimum Lot size.

But I could 'make them smaller' by reducing my leverage.

Reason: