Forex
Google
New signals service!

Go Back   Forex Trading > Programming > Metatrader Programming


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 (1) Thread Tools Display Modes
  #1121 (permalink)  
Old 08-04-2008, 12:02 AM
Junior Member
 
Join Date: Feb 2008
Posts: 3
mifiglo is on a distinguished road
thanks i think u got the problem

Quote:
Originally Posted by FerruFx View Post
I am quite sure that your indicator repaints at least the current bar.

In your EA, in the iCustom() function you use the current bar (the last 0). Try to check the signal only at bar close (set the last number to 1). Then at the first tick of the new candle, if the arrow is still there (and not repaint), the trade won't be a false signal.

Note that I didn't checked it it repaints more than the current bar. But you get the idea.

FerruFx
Pls can u suggest a way to bypass the repaint problem if the indicator repaints more than the current bar?
thanks in advance
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1122 (permalink)  
Old 08-04-2008, 12:52 AM
Linuxser's Avatar
Moderator
 
Join Date: May 2006
Location: Helliconia (Spring)
Posts: 3,306
Blog Entries: 46
Linuxser has disabled reputation
Quote:
Originally Posted by mifiglo View Post
Pls can u suggest a way to bypass the repaint problem if the indicator repaints more than the current bar?
thanks in advance
Suggestion: Write another code.
__________________
Elite Manual Trading | Portfolio | Calendar | Suggestions to improve the forum | My Blog

Remember: Signatures must have three lines as maximum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1123 (permalink)  
Old 08-04-2008, 04:24 AM
Senior Member
 
Join Date: Feb 2007
Posts: 947
FerruFx is on a distinguished road
Quote:
Originally Posted by mifiglo View Post
Pls can u suggest a way to bypass the repaint problem if the indicator repaints more than the current bar?
thanks in advance
You have to find how many bars repaints and then set the shift in the iCustom() function accordingly.

FerruFx
__________________
THE HEART of FOREX & THE PROBABILITY METER - Trade with 100% confidence and ... Stress Less!!!
Coding services: Experts Advisors, indicators, alerts, etc ... more info by PM
NEW: video presentation of the Probability Meter ... 24hrs action on the website
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1124 (permalink)  
Old 08-04-2008, 04:30 AM
Senior Member
 
Join Date: Feb 2007
Posts: 947
FerruFx is on a distinguished road
Quote:
Originally Posted by willmalou View Post
I have an ea that takes trades on a bar more than once. Is there any code that will allow only one trade per bar. EA attached.
Here's your solution:

Quote:
if(timeprev!=Time[0]) {
timeprev = Time[0];

YOUR TRADING CONDITIONS HERE

}
Hope that helps.

FerruFx
__________________
THE HEART of FOREX & THE PROBABILITY METER - Trade with 100% confidence and ... Stress Less!!!
Coding services: Experts Advisors, indicators, alerts, etc ... more info by PM
NEW: video presentation of the Probability Meter ... 24hrs action on the website
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1125 (permalink)  
Old 08-04-2008, 01:26 PM
Junior Member
 
Join Date: Dec 2007
Posts: 1
zaqcool is on a distinguished road
Question help me debug this EA

guys this EA has failed to attach to my live account can someone help me.work on it and post it again when complete and may be improve it it works well with EUR/USD/GBP/USD.
Attached Files
File Type: ex4 FXBonz4i.ex4 (8.7 KB, 13 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1126 (permalink)  
Old 08-04-2008, 02:08 PM
Member
 
Join Date: Sep 2007
Posts: 68
Ronald Raygun is on a distinguished road
We need the mq4 file not the ex4 file. Otherwise we can't help you.

I suspect you downloaded a demo-only version of that EA.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1127 (permalink)  
Old 08-05-2008, 08:59 PM
willmalou's Avatar
Member
 
Join Date: Apr 2006
Posts: 36
willmalou is on a distinguished road
Rsi Ea

Thanks Ferrux will try it tonight.

Would this be the correct way to place in code.

if (timeprev!=Time[0]){
timeprev = Time[0];
if (RSIDailyBuy1_1 > RSIDailyBuy1_2 && RSIH4Buy2_1 > RSIH4Buy2_2 && RSIHBuy3_1 > RSIHBuy3_2 && RSIH4Buy2_1 > RSI_Lower)
{
Order = SIGNAL_BUY;
}
if (RSIDailySell1_1 < RSIDailySell1_2 && RSIH4Sell2_1 < RSIH4Sell2_2 && RSIH1Sell3_1 < RSIH1Sell3_2 && RSIH4Buy2_1 < RSI_Upper)
{
Order = SIGNAL_SELL;
}
}

Last edited by willmalou; 08-05-2008 at 09:10 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1128 (permalink)  
Old 08-06-2008, 01:17 PM
Junior Member
 
Join Date: Jul 2008
Posts: 21
latimeria is on a distinguished road
Unhappy please help me about time limit exit

Hi everyone.

I have a problem with realizing "time limit exit" function on Expert Advisor.

For example, to Exit when 5days have passed after the Entry without exception,
What should I do?

I am a beginner of MQL4 (The C Programming Language also...) and
don't understand the structure of the program well,
but I think the problem is where to place the Variable for counting passed days
and where to count it and close the position when the time has come.

Any help would be greatly appreciated. Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1129 (permalink)  
Old 08-06-2008, 03:37 PM
willmalou's Avatar
Member
 
Join Date: Apr 2006
Posts: 36
willmalou is on a distinguished road
Thanks

Thanks again. it seems to have worked.

Quote:
Originally Posted by FerruFx View Post
Here's your solution:



Hope that helps.

FerruFx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1130 (permalink)  
Old 08-07-2008, 01:42 AM
Senior Member
 
Join Date: Feb 2007
Posts: 947
FerruFx is on a distinguished road
Quote:
Originally Posted by willmalou View Post
Thanks again. it seems to have worked.
You're welcome.

FerruFx
__________________
THE HEART of FOREX & THE PROBABILITY METER - Trade with 100% confidence and ... Stress Less!!!
Coding services: Experts Advisors, indicators, alerts, etc ... more info by PM
NEW: video presentation of the Probability Meter ... 24hrs action on the website
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
candle time, CHinGsMAroonCLK, coders guru, expert advisor, forex, how to code, I_XO_A_H, mechanical trading, trading

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

LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/metatrader-programming/554-how-code.html
Posted By For Type Date
Need an experienced programmer? - Page 2 Post #0 Refback 09-24-2008 07:24 AM

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to code this? iscuba11 Metatrader 4 mql 4 - Development course 1 08-03-2007 05:22 PM


All times are GMT. The time now is 08:39 PM.



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