Coding help - page 56

 
mladen:
dasio Not sure if I understand your intention, but if you want to draw a trend line using 3 points that would all belong to the same line, you can not do that 99.9999% of time (it is an extremely rare case that 3 dots would be on a same straight line, so it is rather an exception than a rule)

I know for this reasons i admin a tolerance how external parameter.

Maybe i have an idea. Can you say me if it can be done and if it is correct?

When the indicator found the last two point if theese are draw with high it search, in the interval between theese two point, for an high spaced from the trendline < the tolerance .

What do you think?

 

Hi,

if i want to calculate the highest price value between openorder and actual price, it is the right way?

for(int e = 0;e <= OrdersTotal(); e++) {

if(OrderSelect(e, SELECT_BY_POS)) {

if(OrderSymbol()== Symbol()) {

if(OrderType() == OP_SELL) {

double Highprice = High;

If it is wrong, what is the right solution?

Thank you

 

No

You have one ")" at a wrong place. It should be like this

double Highprice = High;

[/PHP]

dasio:
Hi,

if i want to calculate the highest price value between openorder and actual price, it is the right way?

[PHP]for(int e = 0;e <= OrdersTotal(); e++) {

if(OrderSelect(e, SELECT_BY_POS)) {

if(OrderSymbol()== Symbol()) {

if(OrderType() == OP_SELL) {

double Highprice = High;

If it is wrong, what is the right solution?

Thank you
 

please!!! how to i change a bar-close signal to an each tick signal? and each/any tick but once per bar?

is there a tutorial somewhere? i have found several indicators with option added to be each tick or bar close method.

i have simple indi I adjusted from ea and its bugging me for longer duration candle like on 4H to have alert an hour or more after event

this is the bit i think i need to change:

(do i just remove -1?)

int start()

{

double visualAddition= 3*_pipsMultiplyer*Point;

int counted_bars=IndicatorCounted();

if(Bars<=100) {return(0);}

int i=Bars-counted_bars-1;

while(i>=0)

{

_buySignal=EMPTY_VALUE;

_sellSignal=EMPTY_VALUE;

_lotSize=_lotSizeDefault;

if(IsBuySignal(i)){

_buySignal=iLow(Symbol(),Period(),i)-visualAddition;

if(_enableAlert){

if(i==1){

Alert("BUY "+Symbol()+" "+Period()+" bluebreeze");

SendMail("bluebreeze Long"+Symbol()+" "+Period(),"bluebreeze Long"+Symbol()+" "+Period());

}

}

}

 

Need help Coding EA with iCustom Indicator

Could anyone help me to figure out how to extract the parameters sets from a custom indicator?

The Data Window show Value, Value2, Value3. A buy signal returns a numeric Value3 greater than 0 and a sell signal returns a numeric Value/Value2.

double sig_buy=iCustom(NULL,0,"Custom_Indicator_name",x,x,x,x,X,0);[/CODE]

,x,x,x,x,X

|________|

[CODE]double sig_buy=iCustom(NULL,0,"Custom_Indicator_name",x,x,x,x,X,0);

,x,x,x,x,X

|________|

Would like to know the how to figure out the parameters, if someone can tell me the parameters that great, but would like to know how.

Thank you.

 
I_Need_Money:
Could anyone help me to figure out how to extract the parameters sets from a custom indicator?

The Data Window show Value, Value2, Value3. A buy signal returns a numeric Value3 greater than 0 and a sell signal returns a numeric Value/Value2.

double sig_buy=iCustom(NULL,0,"Custom_Indicator_name",x,x,x,x,X,0);[/CODE]

,x,x,x,x,X

|________|

[CODE]double sig_buy=iCustom(NULL,0,"Custom_Indicator_name",x,x,x,x,X,0);

,x,x,x,x,X

|________|

Would like to know the how to figure out the parameters, if someone can tell me the parameters that great, but would like to know how.

Thank you.

Hi I_need_money,

If you have the source code its usually no problem, if its ex4 file its more of a challenge.

 

iCustom Coding problem - please help

Hi,

I'm trying to adapt an indicator that calls iFractals and instead call a custom fractal indicator that has an adjustable period feature. The indicator I'm trying to adapt is attached. It's called "closesrelativejtozpreviousofractal."

closesrelativejtozpreviousofractal.mq4

The code plots an up arrow if price breaks the previous fractal high and a down arrow for the reverse.

The indicator I'm trying to call with iCustom is also attached. It's called "Fractals – adjustable."

fractal_-_adjustable.mq4

Below is my attempt to modify the original indicator so that it calls Fractals – adjustable. The code successfully plots dots on the high and low fractals and the fractal period is adjustable, as I wanted. The problem is with the arrows intended to plot the breaks of the prior high and low fractal levels. I can't get them to plot correctly.

Any help with this would be greatly appreciated.

Kind regards,

drofwarc

int start()

{

int counted_bars = IndicatorCounted();

if (counted_bars > 0) counted_bars--;

int limit = Bars - counted_bars;

for(int i=limit; i>0; i--)

{

UpFractalsBuffer=iCustom(NULL,0,"Fractal - Adjustable", dist, arrowPosition, 0, i); //-Draw the high fractal

if (UpFractalsBuffer!=0) //-If it is available, put in the array of fractals for higher levels

HighLevel=iCustom(NULL,0,"Fractal - Adjustable", dist, arrowPosition, 2, i);

if(Close>HighLevel)

UpArrowBuffer=(Low-(PipBuffer)*Poin); //Arrows

DownFractalsBuffer=iCustom(NULL,0,"Fractal - Adjustable", dist, arrowPosition, 1, i); //-Draw the low fractal

if(DownFractalsBuffer!=0) //- If it is available put in the array of lower levels

LowLevel=iCustom(NULL,0,"Fractal - Adjustable", dist, arrowPosition, 3, i);

if(Close<LowLevel)

DownArrowBuffer=(High+(PipBuffer)*Poin);//Arrows

}

return(0);

}
 

got a CODER question rather than answer to the above ( I know OHLC, and modified size , other MT4 stuff, you have to trial and error try out the EFFECT and learn)

MT4 are relative short command code

thesedays, asp.net

the syntax of simple command is dot this and dot that (very long)

my QUESTION:

can CODERS find us some youtube on using DEBUGGER, I know it suppose to set breakpoint, then click one of the icons to STEPS

then watch out some variable values

but it is still very complicated

--

besides, when MICROSOFT give out a message, it is bloody long, like a paragraph

it does not tell you WHAT ARE THE RIGHT TEMPLATE (sample code) to use such command

so it make debugging nowadays, extra complicated (on top of you won't understand each piece of command or the Multiple CHOICE, as it and be dot option 1 or dot option 10)

i.e. after we get the message, how do we find suitable sample to do what we want it to do or fix the code

the whole Question is about debugging nowadays -- can people here shed some LIGHT on the modern coding !!

 

hey mladen or mr tools can you help me!? why no reply?

 

i can see something about count in bars, to give signal at end of bar, but if i delete this it needs some code to give only 1 alert,

why not reply to me? do you want money for it?? why ignore me and before as wel on another question

Reason: