Forex
Google

Go Back   Forex Trading > Programming > Metatrader Programming
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
  #891 (permalink)  
Old 05-10-2008, 04:47 PM
FerruFx FerruFx is online now
Senior Member
 
Join Date: Feb 2007
Posts: 542
FerruFx is on a distinguished road
Quote:
Originally Posted by hiachiever View Post
One obvious thing is that you are missing a declaration for the number of indicator buffers that you are going to use.

This sits in the first part of init
eg
int init()
{
IndicatorBuffers(2);
.....
}
Hiachiever,

I think you dont need to repeat the number of buffers if it is the same as the one defined "#property indicator_buffers 2"

You are right if there's other temporary buffers. But not in that case.

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
  #892 (permalink)  
Old 05-10-2008, 10:02 PM
hiachiever hiachiever is offline
Member
 
Join Date: Jan 2006
Posts: 48
hiachiever is on a distinguished road
Quote:
Originally Posted by FerruFx View Post
Hiachiever,

I think you dont need to repeat the number of buffers if it is the same as the one defined "#property indicator_buffers 2"

You are right if there's other temporary buffers. But not in that case.

FerruFx
Thanks for the Tip FerruFX, always appreciated.

Cheers,
Hiachiever
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #893 (permalink)  
Old 05-11-2008, 12:33 AM
FerruFx FerruFx is online now
Senior Member
 
Join Date: Feb 2007
Posts: 542
FerruFx is on a distinguished road
Quote:
Originally Posted by hiachiever View Post
Thanks for the Tip FerruFX, always appreciated.
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
  #894 (permalink)  
Old 05-12-2008, 12:11 AM
Badguy's Avatar
Badguy Badguy is offline
Member
 
Join Date: Jan 2006
Posts: 40
Badguy is on a distinguished road
How to use CCI Woodies in EA

Hi Cracks

maybe somebody can help me.

The EA makes no trades with this settings

When i will use the indicator CCI_Woodies_Lnx_v4.mq4 in an EA then I use following code:


extern int TrendCCI_Period = 14;
extern int EntryCCI_Period = 6;
extern int LSMAPeriod = 25; // LSMA period
extern int Trend_period = 5;
extern int CountBars = 1000;
extern int CCISize = 2;
extern int TCCISize = 1;
extern int TrendSize = 1;
extern int NoTrendSize = 1;
extern bool ShowLSMA = false;
extern int LineSize3 = 1;

and definition for Indicator is:

double CCI_0 = iCustom(NULL,0,"CCI_Woodies_Lnx_v4",
TrendCCI_Period,EntryCCI_Period,LSMAPeriod,Trend_p eriod,
CountBars,CCISize,TCCISize,TrendSize,NoTrendSize,S howLSMA,LineSize3,0);

to many parameters for indicator?

No error by compiling

In the journal edit:

CCI_Woodies_Lnx_v4 USDJPY,M15: removed

See EA_Test_template
Attached Files
File Type: mq4 CCI_Woodies_Lnx_v4.mq4 (7.9 KB, 2 views)
File Type: mq4 EA_Test_Template CCI Woodies.mq4 (10.3 KB, 4 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #895 (permalink)  
Old 05-12-2008, 01:02 AM
Linuxser's Avatar
Linuxser Linuxser is online now
Moderator
 
Join Date: May 2006
Location: Helliconia (Autumn)
Posts: 2,166
Linuxser has disabled reputation
Quote:
Originally Posted by Badguy View Post
Hi Cracks

maybe somebody can help me.
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!
Reply With Quote
  #896 (permalink)  
Old 05-12-2008, 01:44 AM
FerruFx FerruFx is online now
Senior Member
 
Join Date: Feb 2007
Posts: 542
FerruFx is on a distinguished road
In your iCustom(); what is the LineSize3 parameter? If it's the CCI_Woodies_Lnx_v4 buffer number that's ok, if not, the buffer number you want to call is missing.

Also you have a space in your coding here: "S howLSMA".

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
  #897 (permalink)  
Old 05-12-2008, 02:10 AM
delvinja delvinja is offline
Junior Member
 
Join Date: Apr 2008
Posts: 6
delvinja is on a distinguished road
Need help with this code, please.

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.
Attached Files
File Type: mq4 TestDrive.mq4 (10.1 KB, 4 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #898 (permalink)  
Old 05-12-2008, 03:04 AM
Linuxser's Avatar
Linuxser Linuxser is online now
Moderator
 
Join Date: May 2006
Location: Helliconia (Autumn)
Posts: 2,166
Linuxser has disabled reputation
Quote:
Originally Posted by FerruFx View Post
In your iCustom(); what is the LineSize3 parameter? If it's the CCI_Woodies_Lnx_v4 buffer number that's ok, if not, the buffer number you want to call is missing.

Also you have a space in your coding here: "S howLSMA".

FerruFx
It's the value for the line, thin or bigger.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #899 (permalink)  
Old 05-12-2008, 03:52 AM
delvinja delvinja is offline
Junior Member
 
Join Date: Apr 2008
Posts: 6
delvinja is on a distinguished road
I Need helpseriously

Ferrufx, I am totally new to this. built it on strategybuilder.com, i have no clue to "icustom" and i am lucky to have gotten this far. the idea is to buy when sma is above the top bollinger band and closethe trade once it crosses below the upper band. it should sell when sma is below the lowe bollinger band and close the trade when sma crosses above the lower band. please can you or someone correct this code so that it buys and sells? i'm trying to learn mql as we speak and having a hard time but not giving up yet
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #900 (permalink)  
Old 05-12-2008, 07:24 AM
FerruFx FerruFx is online now
Senior Member
 
Join Date: Feb 2007
Posts: 542
FerruFx is on a distinguished road
Quote:
Originally Posted by Linuxser View Post
It's the value for the line, thin or bigger.
I think so and it's why i asked ... Then the bar shift or the buffer number needed is missing at the end of the iCustom(); line.

delvinja, your code is at the very beginning. Actually I didn't see any long or short conditions to trigger a trade.

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


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
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 02:32 PM.