Register File Sharing Journals Chat Room FAQ Calendar Mark Forums Read

Advertisement







Search Forums
 
» Advanced Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 26-02-2006, 05:05   #1
sharp_in1008
level 1
 
sharp_in1008's Avatar
 
Join Date: Feb 2006
Posts: 2
Downloads: 0
Uploads: 0
Rep Power: 0sharp_in1008 is on a distinguished road
Using Custom Indicator in an EA

Hi,
I am trying to include the code from a custom indicator into an EA. I was wondering if replacing the indicatorcounted() with Bars() is an appropriate get around the errors recieved while trying to compile the indicator code in an EA.

(The reason i don't intend to use the iCustom is that a single function is required to return an array of values and i don't know how functions that return arrays or pointers are handled in mql4. While using them within an EA i can use the arrays as global variables which are then set within the indicator code)
Help is much appreciated.

Last edited by sharp_in1008 : 26-02-2006 at 05:05. Reason: Spell
sharp_in1008 is offline   Reply With Quote
Old 27-02-2006, 08:53   #2
faffle
level 1
 
Join Date: Jan 2006
Posts: 29
Downloads: 0
Uploads: 0
Rep Power: 0faffle is on a distinguished road
Re: Using Custom Indicator in an EA

Cant answer your question directly but here are my thoughts on it.

You can call the indicator with the shift to get older values. EA's work on the current bar, indicators process all bars required. If you need to look at a lot of indicator history on each ea tick, then why not summarise that in an expert and publish it via an object (line, label, etc). Or you could call that in a loop. I havent seen any code that references the indicator arrays directly, and ive looked at quite a few experts.
faffle is offline   Reply With Quote
Old 27-02-2006, 12:34   #3
sharp_in1008
level 1
 
sharp_in1008's Avatar
 
Join Date: Feb 2006
Posts: 2
Downloads: 0
Uploads: 0
Rep Power: 0sharp_in1008 is on a distinguished road
Re: Using Custom Indicator in an EA

Thanks. Would replacing IndicatorCounted by Bars() be ok?
sharp_in1008 is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 On
Forum Jump