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 01-26-2006, 11:37 PM
Willis11of12's Avatar
Willis11of12 Willis11of12 is offline
Senior Member
 
Join Date: Dec 2005
Posts: 105
Willis11of12 is on a distinguished road
Stochastic Sample

I am trying to learn how to write more in these Expert Advisors but so far the only thing I have been able to do is modify the MACD Sample to use a couple different indicators to decide when to buy, sell, and close trades. Two things that I really want to add is a set stop loss instead of the trailing stop loss and also something that would make the number of lots increase as the balance increases, but doesn't ever decrease the number of lots, something that can increase the number of lots to the second decimal. Any help is greatly appreciated!

Also, does anyone know how to prevent trades from duplicating in the same minute? I"ve tried using a Moving Average to close my trades in back testing, but I noticed that there were a few times that it would execute the same trade several times in the same minute or over a couple minutes, so I stopped using it.
Attached Files
File Type: mq4 Stoch Sample.mq4 (5.1 KB, 277 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-28-2006, 10:22 PM
Willis11of12's Avatar
Willis11of12 Willis11of12 is offline
Senior Member
 
Join Date: Dec 2005
Posts: 105
Willis11of12 is on a distinguished road
Update

Nevermind about the help, I think I've pretty well got what I was looking for from the Questions forum. Well, except with the lot increase it also decreases when the balance decreases, but it still works great much better now!
Attached Images
File Type: gif TesterGraph.gif (11.5 KB, 453 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 09-22-2006, 05:11 PM
leeb's Avatar
leeb leeb is offline
Senior Member
 
Join Date: Dec 2005
Posts: 351
leeb is on a distinguished road
Hi, your improved EA looks interesting, is the backtest with 90% quality ? Could you post the EA, thanks !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 09-22-2006, 05:34 PM
phoenix's Avatar
phoenix phoenix is offline
Senior Member
 
Join Date: May 2006
Posts: 287
phoenix is on a distinguished road
Quote:
Originally Posted by Willis11of12
Also, does anyone know how to prevent trades from duplicating in the same minute?
for(int i=0; i<HistoryTotal();i++)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY))
int closeminute=TimeMinute(OrderCloseTime());
}
**********
or if(OrderSelect(HistoryTotal()-1,SELECT_BY_POS,MODE_HISTORY))
for picking up the last order
**********
if(TimeMinute(CurTime())==closeminute)bool BlockOpen=true;

if(!BlockOpen)
{
OrderSend(......);
}

Last edited by phoenix : 09-22-2006 at 05:37 PM.
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
rsi and stochastic One Indicators - Metatrader 4 5 04-01-2006 06:12 AM
Sample quality EasyFx Expert Advisors - Metatrader 4 2 03-10-2006 03:12 PM
Stochastic v1 kostya2312 Expert Advisors - Metatrader 4 16 01-17-2006 07:15 AM


All times are GMT. The time now is 09:00 PM.