ICustom function - page 11

 
paytongannaway:
I have an indicator that I am very fond of and have demo'd it for a couple of weeks and been pretty successful. Is there a way where I can automate buy/sell orders based on the indicator? Short summary is it's a small arrow pointing either up or down on the chart when the indicators I like line up. Is there a way that when the arrow pops up it will place an order for me?

Codersguru has a whole tutorial on how to write an EA. Read it, you will learn a lot.

 

You can use the iCustom function to incorporate your external indicator but you'll have to write the other logic (buy/sell etc.) yourself. It's pretty straightforeward.

Good luck

Lux

 

where is this codersguru at?

 

I need help with iCustom for Histogram

Anyone can help me here? I am trying to do an object create of a uptrend or downtrend using iCustom and a indicator that displays Histogram bars above 0 and below 0.

How do i make use of the iCustom function to call on it that when its above 0, it a uptrend and when its below 0 its a downtrend?

It goes something like this for now:

string Trigger="";

color colt6;

double trigger1 = iCustom(NULL, 0,"Trigger",24, ??????? , 0);

if ((trigger1 > 0)) { Trigger="UP"; colt6=Lime; }

if ((trigger1 < 0)) { Trigger="DOWN"; colt6=Red; }

ObjectCreate("MA00", OBJ_LABEL, 0, 0, 0);

ObjectSetText("MA00",Trigger,28, "Arial", colt6);

ObjectSet("MA00", OBJPROP_CORNER, 0);

ObjectSet("MA00", OBJPROP_XDISTANCE, 0);

ObjectSet("MA00", OBJPROP_YDISTANCE, 0);

 

Need help on iCustom function

codersguru:
Sure, I'll do.

--------------------------------------------------------------------------------

Codesguru, can help me? I am trying to do an object create of a uptrend or downtrend using iCustom and a histogram indicator that displays Histogram bars above 0 and below 0.

How do i make use of the iCustom function to call on it that when its above 0, it an Uptrend and when its below 0 its a Downtrend? Also, how do i set a popup alert to alert 1 time only?

It goes something like this for now:

string Trigger="";

color colt6;

double trigger1 = iCustom(NULL, 0,"Trigger",24, ??????? , 0);

if ((trigger1 > 0)) { Trigger="UP"; colt6=Lime; }

if ((trigger1 < 0)) { Trigger="DOWN"; colt6=Red; }

ObjectCreate("MA00", OBJ_LABEL, 0, 0, 0);

ObjectSetText("MA00",Trigger,28, "Arial", colt6);

ObjectSet("MA00", OBJPROP_CORNER, 0);

ObjectSet("MA00", OBJPROP_XDISTANCE, 0);

ObjectSet("MA00", OBJPROP_YDISTANCE, 0);

if(Trigger==Up")

Alert(Symbol()," - ","H1:"," Uptrend"," at ", Bid);

Many thanks for anyone who can give a pointer on how I will be able to do the above.

 

iCustom - How can i get the value from Custom Indicator?

Hello everyone,

This is my first post on this forum . I try to edit Heiken Ashi Ma indicator to myIndicator and use one simple EA script (once_per_candle) to get a value from myIndicator.

Yes, i know can use iCustom, but how setting i must use with iCustom to get that value.

Indicator -myIndicator

----------------------

i want this indicator return value of Trend. I declare trend as extern string trend

EA -once_per_candle

--------------------

Every period (for this script i use M15 timeframe), script will get a trend value from myIndicator.

Please anyone help me to help how to get that value?

Files:
 

iCustom Question

I have an indicator which compares several values. I wish to bring those values into my EA. So far, what I've found, of the use of iCustom function is; calling the name of the indicator and comparing two different time periods of the same MA. How would I use iCustom to compare two different values of the same indicator.

For example:

Let's say that I have an MA of the average of the High and Low for a 15 min Period, and a MA of Close Price over 13 Periods, in the same Indicator. Let's say that I want to place a Buy, in my EA, when the MA of the Close Price crosses under the MA of the average of High/ Low, in the Indicator.

How would I utilize the iCustom Function to capture a state which occurs between two different MAs in the same Indicator?

 

You just read the different indicators in your EA using icustom and do a compare

val1 = iCustom(NULL, 0,"sar_filter_alert",5,9,3,3,1,1,0.02,0.2,0,0);

val2 = iCustom(NULL, 0,"AsciiTrade",10,20,5,0,0);

Then if(val1 > val2 etc

or if you want to compare 2 values in the same indicator, change the values in the second read

val1 = iCustom(NULL, 0,"sar_filter_alert",5,9,3,3,1,1,0,0);

val2 = iCustom(NULL, 0,"sar_filter_alert",25,19,3,3,1,3,1,0);

 

Increase,

Thanks for the reply, but my question is with reqards to a single Custom Indicator with several MAs in which I want to utilize the relationship of two of the MAs ( even their relationship to a third MA ) for my positioning of Buy and Sell Orders. How would I utilize the iCustom Function, so that I can call and compare the relationship of two MAs, from within the same Custom Indicator. Since I can't execute orders from an Custom Indicator, I have to bring them into an EA.

Yellowbeard

 

Increase,

Thanks again for the reply! Sorry about my reply! When I read your post I only saw the first half of it. I see now that you did answer my question, in the second half.

Thanks again!

Yellowbeard

Reason: