Forex
Google

Go Back   Forex Trading > Programming > Metatrader Programming
Forex Forum FAQ Members List Calendar 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

 
 
LinkBack Thread Tools
 
Old 05-12-2008, 09:05 AM
delvinja delvinja is offline
Junior Member
 
Join Date: Apr 2008
Posts: 6
delvinja is on a distinguished road
need help

Thanks, ferrufx for the info. but how do iget this ea to work i obviously am not competent enough to make the adjustments myself so any assistance would be greatly appreciated, thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 
Old 05-12-2008, 09:15 AM
Badguy's Avatar
Badguy Badguy is offline
Member
 
Join Date: Jan 2006
Posts: 40
Badguy is on a distinguished road
CCI Woodies

Thanks Linuxer

I try to learn a little bit of coding MQL4 by copy and paste.
It's not so important, only for my learning.

Thanks once again


Quote:
Originally Posted by Linuxser View Post
I see with your code the idea is to buy/sell above/below 0 line.

Why don't you try with iCCI for your TCCI instead of call iCustom. There is nothing different between standard CCI and the other indicator.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 
Old 05-12-2008, 09:49 AM
FerruFx FerruFx is offline
Senior Member
 
Join Date: Feb 2007
Posts: 542
FerruFx is on a distinguished road
Quote:
Originally Posted by FerruFx View Post
delvinja, your code is at the very beginning. Actually I didn't see any long or short conditions to trigger a trade.
Sorry delvinja, I answered wrong by looking the wrong EA. This answer was for Badguy.

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!
 
Old 05-12-2008, 01:28 PM
delvinja delvinja is offline
Junior Member
 
Join Date: Apr 2008
Posts: 6
delvinja is on a distinguished road
Custom indicator for coding EA

The indicator is the Macd_BB like the one used by Nexgen.
Settings are as follows"
FastLen = 10
SloLengthwLen = 26
Length = 10
Stdev = 1

a buy order should be executed when a green ball is developed above the upper line and closes only when the balls cross below the upper line again or hits ny trailing stop.
a sell is executed when a magenta ball is developed below the lower line and closes only when the balls cross above the lower line again.

take profits and stop loss should be moderate and allow the settings to be changed to tweak the expert. Ihave attached the indicator and am most grateful for your help with this.
If there is anything else that you may need you can post here or email me at delvin.patrick@gmail.com

thanks again bro!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 
Old 05-12-2008, 01:30 PM
delvinja delvinja is offline
Junior Member
 
Join Date: Apr 2008
Posts: 6
delvinja is on a distinguished road
Ooops forgot to attach the indicator here it is

here is the indicator Ferrufx, sorry about that(for the expert advisor)
Attached Files
File Type: mq4 MACD BB.mq4 (4.4 KB, 5 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 
Old 05-12-2008, 03:21 PM
apres apres is offline
Junior Member
 
Join Date: Sep 2006
Posts: 3
apres is on a distinguished road
Indicator won't refresh

I've tried to translate this indicator from another language.
It loads up OK but it won't refresh at the next new bar and subsequent bars.
Any help would be most welcome.
Attached Files
File Type: mq4 Zero Lag Stochastic.mq4 (3.3 KB, 2 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 
Old 05-12-2008, 03:28 PM
newdigital newdigital is online now
Administrator
 
Join Date: Sep 2005
Posts: 15,230
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
Try this thread Zerolag systems - may be you will find something similar.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 
Old 05-12-2008, 04:11 PM
Michel Michel is offline
Senior Member
 
Join Date: Feb 2006
Posts: 502
Michel is on a distinguished road
Quote:
Originally Posted by delvinja View Post
Hi guys i have been trying for the last three days to get this expert advisor to execute long trades in mt4 with no success. it only executes short trades even though the signal_buy is there . please could anyone have a look at this code and fix it for me or tell me what to do. i'm new to programming and built it from an online strategy builder. thanks in advance!

the code is attached.
PHP Code:
double ... = iMA(NULL03, -3MODE_SMAPRICE_CLOSECurrent 0); 
I am not sure about the -3 shift parameter : it shift the curve to the left, so the current bar is undefinited. Try to replace all -3 by 0 to see if the buy orders are triggered.
I would replace
PHP Code:
double Var1 iMA(NULL03, -3MODE_SMAPRICE_CLOSECurrent 0);
double Var2 iMA(NULL03, -3MODE_SMAPRICE_CLOSECurrent 0);
double Var3 iBands(NULL02021PRICE_CLOSEMODE_UPPERCurrent 0);
double Var4 iBands(NULL02021PRICE_CLOSEMODE_LOWERCurrent 0);

double Buy1_1 iMA(NULL03, -3MODE_SMAPRICE_CLOSECurrent 0);
double Buy1_2 iBands(NULL02021PRICE_CLOSEMODE_UPPERCurrent 0);

double Sell1_1 iMA(NULL03, -3MODE_SMAPRICE_CLOSECurrent 0);
double Sell1_2 iBands(NULL02021PRICE_CLOSEMODE_LOWERCurrent 0);

double CloseBuy1_1 iMA(NULL03, -3MODE_SMAPRICE_CLOSECurrent 0);
double CloseBuy1_2 iBands(NULL02021PRICE_CLOSEMODE_UPPERCurrent 0);

double CloseSell1_1 iMA(NULL03, -3MODE_SMAPRICE_CLOSECurrent 0);
double CloseSell1_2 iBands(NULL02021PRICE_CLOSEMODE_UPPERCurrent 0); 
by
PHP Code:
double Buy1_1 iMA(NULL030MODE_SMAPRICE_CLOSECurrent);
double Buy1_2 iBands(NULL02021PRICE_CLOSEMODE_UPPERCurrent);

double Sell1_1 Buy1_1;
double Sell1_2 iBands(NULL02021PRICE_CLOSEMODE_LOWERCurrent);

double CloseBuy1_1 Buy1_1;
double CloseBuy1_2 iBands(NULL02021PRICE_CLOSEMODE_UPPERCurrent);

double CloseSell1_1 Buy1_1;
double CloseSell1_2 iBands(NULL02021PRICE_CLOSEMODE_UPPERCurrent); 
Rem :
- Var1,2,3,4 are not used.
- Both CloseBuy1_2 and CloseSell1_2 are the same : one is probably wrong (MODE_LOWER)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 
Old 05-12-2008, 05:40 PM
delvinja delvinja is offline
Junior Member
 
Join Date: Apr 2008
Posts: 6
delvinja is on a distinguished road
Need help with code

Michel, thanks a lot for your help, that fixed it perfectly! you guyss are the best, i can finally get some rest. I'll let you know how my testing turned out.

oh by the way, r u saying that -3 will never be able to work in this expert advisor? thanks again.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 
Old 05-12-2008, 07:31 PM
Michel Michel is offline
Senior Member
 
Join Date: Feb 2006
Posts: 502
Michel is on a distinguished road
Quote:
Originally Posted by delvinja View Post
... oh by the way, r u saying that -3 will never be able to work in this expert advisor? thanks again.
To tell you the truth, I never really understood the use of this shift : if you want to know the value of an indic 3 bars before the current bar, just use 3 as shift, but the last one; the first one just shift the drawing of the curve, and if you use a negative value, it's like the past is knowing the future...
Anyway I would be happy that someone explain me it's use !

But to answer your question, try to know the exact strategy you want to follow, from where comes that -3 ?

Last edited by Michel : 05-12-2008 at 07:34 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 

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

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
How to code this? iscuba11 Metatrader 4 mql 4 - Development course 1 08-03-2007 04:22 PM


All times are GMT. The time now is 08:47 AM.