Forex



Go Back   Forex Trading > Programming > MetaTrader
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 01-27-2006, 12:37 AM
Willis11of12's Avatar
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, 405 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #2 (permalink)  
Old 01-28-2006, 11:22 PM
Willis11of12's Avatar
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, 824 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #3 (permalink)  
Old 09-22-2006, 06:11 PM
leeb's Avatar
Senior Member
 
Join Date: Dec 2005
Posts: 368
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #4 (permalink)  
Old 09-22-2006, 06:34 PM
phoenix's Avatar
Senior Member
 
Join Date: May 2006
Posts: 319
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 06:37 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #5 (permalink)  
Old 11-02-2008, 08:57 AM
Junior Member
 
Join Date: Jun 2007
Posts: 10
rayz is on a distinguished road
Simple Ea Using One Indicator And Time Filter

Hello all frend,

i need some help because i m not are programer,i have try myself to copy paste code MQL time filter for simple stoch ea that i found somewhere in internet but time filter not working.

I rely need help for my very simple trading style , I need to using ea base on my trading style to easyly filter time for entry trading and timing corectly.

My ea must use Stoch(8,3,3) indicator only,open position when cross line at 80&20 overbought/oversold only. Using M5 chart,TP=10,SL=15,Lot=0.1 and need time filter option input like this, or any kind suggestion for time filter.

Time Filter 1=1-6
Time Filter 2=16-19

Sorry for my bad english, hope this thread for all kind of simple ea using one indicator and time filter only.

Thanks.

Last edited by rayz; 11-04-2008 at 08:44 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #6 (permalink)  
Old 11-02-2008, 05:52 PM
ElectricSavant's Avatar
Senior Member
 
Join Date: Jun 2007
Posts: 3,354
ElectricSavant is on a distinguished road
Does the EA in the opening post have this chunk of code? Because if it does not...I would have no idea how to add this and at what postion using the editor...You would not believe what I can do to MT4 when you cut me loose like this...Can someone post the finished product?...so all I have to do is click, download and then buy a yacht...Thank you very much ☺ Trading is easy.

ES


Quote:
Originally Posted by phoenix View Post
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 ElectricSavant; 11-02-2008 at 05:55 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #7 (permalink)  
Old 11-04-2008, 08:43 AM
Junior Member
 
Join Date: Jun 2007
Posts: 10
rayz is on a distinguished road
can u put time filter

Quote:
Originally Posted by Willis11of12 View Post
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.
can u put time filter for u stoch ea?? stoch is usefull at the certain range time only.unfortunately i dont know how to code it for my ea.

Last edited by rayz; 11-04-2008 at 09:13 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks

Tags
stochastic


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
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 04:12 PM
Stochastic v1 kostya2312 Expert Advisors - Metatrader 4 16 01-17-2006 08:15 AM


All times are GMT. The time now is 09:52 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.