Coding help - page 221

 
mladen:
Air92 I am afraid that I do not understand the question. Can you please try explaining it some other way?

of course

Files:
eurjpym5.png  41 kb
 
Air92:
of course

Air92

Here you go

Have a nice weekend

 
altoronto:
Mladen, first of all, all the best to you and your family in 2014. Have a question for you, how can I normalize two indicators in separate window (first one it's in range -2/2 and second one is 0-100)? Thank you in advance.

altoronto

Just wanted to point out one property of rsi when it comes to its usage for normalization : see the slope of the kaufman ama and the slope of rsi of that same kaufman ama - interesting isn't it

Files:
 
mladen:
Air92

Here you go

Have a nice weekend

Thank you so much,Mladen.Very beautiful

P.S I now will know that it is called in a separate window

 

Thank you Mr. Mladen,

I really feel like a little baby learning Chess!! just playing with the pieces out of the table....

I have looked at the files in the link you redirected me, it still looks like a jungle to me, could you explain me in this code, where do i need to input my PHP code? and what should be erased for only drawing 1 line in the price of the code? instead of 5 days high or low should be "Key of The Day"...

the PHP code we last build is :

double dayOpen=iOpen(NULL,PERIOD_D1,0);(iOpen(NULL,PERIOD_D1,0)+High[0]+Low[0])/3= number1

what would be the correct definition for "number1" from the code?

and the code for the line is :

//---- input parameters

extern int DAYS=5;

//+------------------------------------------------------------------+

//| Custom indicator initialization function |

//+------------------------------------------------------------------+

int init()

{

//---- indicators

//---- indicators

//----

return(0);

}

//+------------------------------------------------------------------+

//| Custom indicator iteration function |

//+------------------------------------------------------------------+

int start()

{

double daily_high[20];

double daily_low[20];

double yesterday_close;

double phigh,plow;

int i=1;

//---- TODO: add your code here

ArrayResize(daily_high,DAYS);

ArrayResize(daily_low,DAYS);

ArrayInitialize(daily_high,0);

ArrayInitialize(daily_low,0);

ArrayCopySeries(daily_low, MODE_LOW, Symbol(), PERIOD_D1);

ArrayCopySeries(daily_high, MODE_HIGH, Symbol(), PERIOD_D1);

/* initialise */

plow=daily_low[1];

phigh=daily_high[1];

for(i=1;i<DAYS;i++)

{

if(plow>daily_low)

{

plow =daily_low;

}

}

for(i=1;i<DAYS;i++)

{

if(phigh<daily_high)

{

phigh =daily_high;

}

}

Comment("\n5dayH ",phigh,"\n5dayL ",plow);

ObjectDelete("5dayHigh");

ObjectDelete("5dayLow");

ObjectCreate("5dayHigh", OBJ_HLINE,0, CurTime(),phigh);

ObjectSet("5dayHigh",OBJPROP_COLOR,SpringGreen);

ObjectSet("5dayHigh",OBJPROP_STYLE,STYLE_SOLID);

ObjectCreate("5dayLow", OBJ_HLINE,0, CurTime(),plow);

ObjectSet("5dayLow",OBJPROP_COLOR,Red);

ObjectSet("5dayLow",OBJPROP_STYLE,STYLE_SOLID);

ObjectsRedraw();

return(0);

}

//+------------------------------------------------------------------

Thanks in advance

 

I learned playing chess when I was 4...and as far as I remember it took me around 5 minutes to memorize all the moves...I still have got no clue about programming...and I am not 4:)

 

daniel1983, I hope this is what you looking for. It's based on previous bar [1].

Regards,

alToronto

Files:
sd.mq4  3 kb
 

Dear Altoronto,

Thank you very much, i will have a look to this help you send me, thank you very much, this are like my first steps

Pava, i don't know what age i have finally learned, i know when i was 4 or 5 i remember i knew all the moves, but still used to play around the chess table, not into it

Thanks

daniel1983

 

Dear Altoronto,

This is not what i'm looking for, it's more "easy":

I need to draw 1 single Horizontal line in color green at PriceX

PriceX = double dayOpen=iOpen(NULL,PERIOD_D1,0);(iOpen(NULL,PERIOD_D1,0)+High[0]+Low[0])/3

I have seen in other forum that for a single horizontal line code isObjectCreate("UniqueName", OBJ_HLINE, 0, Time[0], YourPrice, 0, 0);

Where do i put the PriceX code into this code? how shall be done?

Thank you

 

daniel1983, here you go, one line.

Files:
sd_1.mq4  2 kb