Trouble passing value from iCustom to EA

 
Hi everyone -- I have taken a Fractal Signal Indicator program off the forum and have been attempting some modifications. Simply, the original indicator draws arrows onto the chart. I have assigned a score (idF) for each type of arrow on the indicator.

My goal is for the EA to check the indicator to see what the last arrow was drawn on the chart. I want to pass the indicator's idF score back to the EA so that my EA knows how to place the next order. But I am having trouble getting idF score back to the EA. It seems to run fine on the indicator.

Perhaps I am not using the iCustom() function correctly. I would appreciate if someone provide the correct direction for me.

Here is the guts of my EA:

// int idF = iCustom(NULL,0,"ForumFractalsIndicator",0,1,0);
// Print("The ForumFractalsIndicator reports the last idF score is ", idF);


Here is the entire ForumFractalsIndicator I am using:


Hi everyone . . . thanks for the feedback! I have removed the original pasted text and uploaded the ForumFractalsIndicator I am using.


I will take your advice and work on passing the external variables through first and also setting the data type to double.


I do appreciate all the help!


Daniel
 

iCustom returns a double not an int so that migght be a good place to start or end even.

 

Something is screwed up here either my computer or this website. It keeps jumping out of edit mode and I can't select the text above in order to try it out and to indent the code to see the problem. Can you post the sorce file it would be much easier.

 
// int idF = iCustom(NULL,0,"ForumFractalsIndicator",0,1,0);

Your indicator contains five (5) external variable, but you're not passing them with iCustom

Also don't paste your code, use the SRC button to keep the spacing.

 

U have external variables in the source indicator, UR EA must know there values when call the buffer index (note that source indicator is sleep now and the external variables must be set), so thesethings U must do with your EA to pass external values :

1- Add the extern variables formats of the indicator to the header of the EA .

2-Put there names by the same order as parameters in the iCustom function after the string of the name of the indicator .


another note, i really don,t know what is the use of the 4th parameter that u put in the iCustom after the name of the indicator which is "0", it's useless,can anybody tell me if I'm wrong.

 
Ruptor:

Something is screwed up here either my computer or this website. It keeps jumping out of edit mode and I can't select the text above in order to try it out and to indent the code to see the problem. Can you post the sorce file it would be much easier.


I have edited the original posting to include the source file for my indicator. I am looking at the data types to make sure they are where they need to be.

 
daniel295261:

Here is the guts of my EA:

// int idF = iCustom(NULL,0,"ForumFractalsIndicator",0,1,0);

Daniel, what's the use of the 4th parameter "0" if u passing the 5th parameter the buffer index "1" to the iCustom ?

or what the use of the 5th "1" if u passing the 4th "0" ?

if u want to call the values of both indexes, u must call each index value alone, mean iCustom for every index.

 
tiodaronzi:

Daniel, what's the use of the 4th parameter "0" if u passing the 5th parameter the buffer index "1" to the iCustom ?

or what the use of the 5th "1" if u passing the 4th "0" ?

if u want to call the values of both indexes, u must call each index value alone, mean iCustom for every index.



Tiodaronzi;


You are correct. It seems I was attempting to use one iCustom to capture two index values. The coders here have given me some helpful homework. I am revamping my code to get it right.

I also noticed a critical failure in the premise of the strategy I was attempting to achieve, so I am taking some time to review the foundation of my strategy and using this indicator.


I'll keep you posted on my progress Tiodaronzi. Thanks for your advice!


Daniel

 
daniel295261:
Hi everyone -- I have taken a Fractal Signal Indicator program off the forum and have been attempting some modifications. Simply, the original indicator draws arrows onto the chart. I have assigned a score (idF) for each type of arrow on the indicator.

My goal is for the EA to check the indicator to see what the last arrow was drawn on the chart. I want to pass the indicator's idF score back to the EA so that my EA knows how to place the next order. But I am having trouble getting idF score back to the EA. It seems to run fine on the indicator.

Perhaps I am not using the iCustom() function correctly. I would appreciate if someone provide the correct direction for me.

Here is the guts of my EA:

// int idF = iCustom(NULL,0,"ForumFractalsIndicator",0,1,0);
// Print("The ForumFractalsIndicator reports the last idF score is ", idF);


Here is the entire ForumFractalsIndicator I am using:


Hi everyone . . . thanks for the feedback! I have removed the original pasted text and uploaded the ForumFractalsIndicator I am using.


I will take your advice and work on passing the external variables through first and also setting the data type to double.


I do appreciate all the help!


Daniel
looking at your indicator i would like to suggest to make ea on this indicator, if you interested tell me too i'll help in programming.
Files: