Forex



Go Back   Forex Trading > Programming > Metatrader Programming
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

 
 
Thread Tools
 
Old 11-17-2007, 10:59 AM
Junior Member
 
Join Date: Nov 2007
Posts: 1
sakkara is on a distinguished road
Expert Advisor - Open Trade Issue

Hi,
I have programmed an expert advisor and is working well! It does everything I need it to do, except that there is one bug or flaw in my advisor.

I use an oscillator to get the trend, and then either open a long or short. If the trend goes the other way, it closes the current trade and opens another. This works fine, except that when back trading. One tick makes the trent up, so I open a trade. The very next tick makes the trend down, so I close the long and open a short. So on and so on, so that I actually make about 15 until the trend definately goes one way or another.

Is there any way I can somehow skip an hour's worth of ticks once I open a trade? So that I no longer trend the wrong way, etc?

Any help would be greatly appreciated!
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!
 
Old 11-17-2007, 01:04 PM
demam_emas's Avatar
Senior Member
 
Join Date: Jan 2006
Location: Ambarawa City
Posts: 155
demam_emas is on a distinguished road
Wink

i think you should use previous bar instead current bar. Use bar index 1, not 0 for your oscillator.
Good luck
__________________
Click! Free $100 monthly (Trade 10 lots needed). Click! Free welcome bonus up to $5000
Click! Download premium forex indicators for free!
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!
 
Old 11-18-2007, 07:06 AM
wolfe's Avatar
Senior Member
 
Join Date: Jan 2006
Posts: 816
wolfe is on a distinguished road
Quote:
Originally Posted by demam_emas View Post
i think you should use previous bar instead current bar. Use bar index 1, not 0 for your oscillator.
Good luck
Or use previous bar And current bar.

if (current_bar > previous_bar)
{Ordersend() Long}

if (current_bar < previous_bar)
{Ordersend() Short}

Use something like that, This will stop the multiple open and close of orders in a small time frame. Plus it is using two bars to confirm the trend, instead of just one.

Just my thoughts, good luck!
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!
 

Bookmarks
Thread Tools

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
expert advisor ? swirly Expert Advisors - Metatrader 4 4 09-22-2009 03:34 PM
CCI Expert Advisor rodrigokaus Expert Advisors - Metatrader 4 26 07-20-2009 06:36 AM
How to make an expert advisor run other expert advisors in MQL4 activetc Metatrader 4 0 08-30-2007 05:29 AM
Need Help w/Expert Advisor cochran1 Expert Advisors - Metatrader 4 14 08-01-2007 04:55 PM
What Expert Advisor are they using? fikko Expert Advisors - Metatrader 4 4 07-01-2006 09:47 AM


All times are GMT. The time now is 01:04 PM.



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