Ask! - page 143

 

This is the question that may not make any sense to your guys. I don't know how to code and I am not a programmer either. Anyhow have anyone written an indicator that calculated on 2 or 3 minutes then runs with one minute chart? All your help is appreciated.

 

i think is what you are looking for put it on a 1 minute chart then chnage the mulitplier to what you want example : 2 min. multiplier 2, 3 min multiplier 3 etc

and dont forget to check the allow .dll imports in the common tab.then go to file/open offline and your chart should be there.good luck

period_converter_opt.mq4

Files:
 
sfmain:
i think is what you are looking for put it on a 1 minute chart then chnage the mulitplier to what you want example : 2 min. multiplier 2, 3 min multiplier 3 etc

and dont forget to check the allow .dll imports in the common tab.then go to file/open offline and your chart should be there.good luck

period_converter_opt.mq4

Would you please modify this indicator as an sample for me. Thank you again in advance for all your kind help. BTW this indicator from FOREX TSD Forum, MTF indicator, posted by Keris 2112 and Linuxser. I'm not the author many thanks for their effort so others will have them.

Files:
mtf_rsi.ex4  3 kb
mtf_rsi.mq4  4 kb
 
sfmain:
i think is what you are looking for put it on a 1 minute chart then chnage the mulitplier to what you want example : 2 min. multiplier 2, 3 min multiplier 3 etc

and dont forget to check the allow .dll imports in the common tab.then go to file/open offline and your chart should be there.good luck

period_converter_opt.mq4

Thank you for your patient sfmain, how idiot could I be? Your instruction is so clear. The offline chart is up now. My next questions are:

How could I run this 2 M chart live?

Besides just like my last message, will there be possible to modify any MTF indicator to 2 minutes time frame and attach them separately on 1 min. chart live?

Many thanks again for your kind help.

 

Friends ı have an EA with support resistance indicator.EA must complete orders on target profit.But it lacks sometime.How can ı get rid of this problem.Please help me

 

how to get OrderClose return price ?

I want to know, at what price the order is closed ......

Files:
closeorder.jpg  62 kb
 

About take profit & stop loss

I am sorry for my english.

In Coders' Guru - First Expert Advisor - we get "TakeProfit = 250".

I thing TakeProfit is the maximum profit that we can take,

but when backtest in 4H tf we got profit 980, 855, etc.

And when I try to add stop loss "TakeStop = 350"

OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Bid+TakeStop*Points,Bid- TakeProfit*Points, "macd sample",16384,0,Red);

It still I got stop for -950, -1420, etc.

Can anyone explain me why ?

 

Hi all,

I'm sorry. I mean to search but my keyword is too short. I just want to know if there is any way I can get the code for *.ex4 files? (keyword for my search: ex4)

I would like to do a simple editing to my preference but I only have the *.ex4 file.

Any help?

 

First quote of a new candle?

I'm sure this must have been asked before - apologies if so, but I can't find it discussed anywhere.

As I understand it "When new quotations are received, the "start()" function of attached expert advisors and custom indicator programs is executed."

I want to do some checks at the first quote of a new 5 min candle. Is there an elegant way to check that this is the first quote of a new candle?

thanks in advance for any ideas.

 

No one interested?

Just in case somebody's listening ...

How about this ? Does it make sense for 5min timscale?

int Minute5; //global to hold 5 minute number

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

//| expert start function |

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

void init()

{

Minute5 = TimeMinute(TimeCurrent()) / 5;

}

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

int start()

{

if (ManageOpenOrders() > 0)

{

return(0);

}

else

{

if ( (TimeMinute(TimeCurrent()) / 5) != Minute5 )

{

Minute5 = TimeMinute(TimeCurrent()) / 5; //reload variable at first tick of every candle

// check trade criterion ...

Reason: