Coding help - page 155

 
mladen:
cawat This one will do that. You can specify various properties of the time-symbol label using parameters

Thank you so much mladen.

 

Mladen ,

Is it possible to convert ex4 indicator values into csv file?Do you know? Thanks.

 
nevar:
Mladen , Is it possible to convert ex4 indicator values into csv file?Do you know? Thanks.

nevar

Yes (using another indicator that will call that ex4 indicator through iCustom() function)

 

Dear all,

I had some problem in this coding EA...

Why this cannot executed only one order?

I want execute one order and stop, but it executed more...

Can anyone help me?

Thanks.

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

extern double LotMultiplikator = 1.667;

extern double Step = 5.0;

extern double lots = 0.1;

extern double stopsize = 20;

extern double profsize = 10;

extern bool Non_Stop = false;

int err;

int ticket;

double stop;

double prof;

int start()

{

ticket=OrderSend(Symbol(), OP_BUY, lots, Ask, 3, 0, 0);

stop=(Ask-stopsize*Point);

prof=(Ask+profsize*Point);

OrderModify( ticket, OrderOpenPrice(), stop, prof, 0, Blue);

err=GetLastError();

// Comment("This is a test ", err, " ", stop, " ", prof);

Comment(" ");

}

 
hock87:
Dear all,

I had some problem in this coding EA...

Why this cannot executed only one order?

I want execute one order and stop, but it executed more...

Can anyone help me?

Thanks.

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

extern double LotMultiplikator = 1.667;

extern double Step = 5.0;

extern double lots = 0.1;

extern double stopsize = 20;

extern double profsize = 10;

extern bool Non_Stop = false;

int err;

int ticket;

double stop;

double prof;

int start()

{

ticket=OrderSend(Symbol(), OP_BUY, lots, Ask, 3, 0, 0);

stop=(Ask-stopsize*Point);

prof=(Ask+profsize*Point);

OrderModify( ticket, OrderOpenPrice(), stop, prof, 0, Blue);

err=GetLastError();

// Comment("This is a test ", err, " ", stop, " ", prof);

Comment(" ");

}

I see you are not using magic number, so the assumption is that it does not matter what is the magic number or symbol. In that case first check if there is already an opened order - like this :

if (OrdersTotal()<1)

{

ticket=OrderSend(Symbol(), OP_BUY, lots, Ask, 3, 0, 0);

stop=(Ask-stopsize*Point);

prof=(Ask+profsize*Point);

OrderModify( ticket, OrderOpenPrice(), stop, prof, 0, Blue);

}

If you decide to use magic number and symbol check then it is best to make a function that will count orders opened for the specified symbol and / or magic number

 
nevar:
Mladen , Is it possible to convert ex4 indicator values into csv file?Do you know? Thanks.

PS: it is possible to do even for "hidden" buffer values

 

mladen, is it possible to recode an indicator-window indicator and make it appear on the main chart? I have a renko chart indicator but this appears on the indicator window. I'd like it to appear on the main chart.

Files:
 
RyuShin:
mladen, is it possible to recode an indicator-window indicator and make it appear on the main chart? I have a renko chart indicator but this appears on the indicator window. I'd like it to appear on the main chart.

RyuShin

It can not be done in a meaningfull way for one simple reason : renko charts are not time bound. That means that we can not find an exact "time alignment" of a renko bar and a OHLC bar (or candle). For example (just a wild example) you could have a renko bar that starts at nn minutes and 30 seconds while OHLC bar always starts at 0 seconds.

We can place them there on chart, but they would be at all wrong places and that would be highly misleading

 
mladen:
RyuShinIt can not be done in a meaningfull way for one simple reason : renko charts are not time bound. That means that we can not find an exact "time alignment" of a renko bar and a OHLC bar (or candle). For example (just a wild example) you could have a renko bar that starts at nn minutes and 30 seconds while OHLC bar always starts at 0 seconds. We can place them there on chart, but they would be at all wrong places and that would be highly misleading

Okay I understand. That's pretty informative. Thanks mladen.

 

Dear MLaden,

Next indi I can get on chart in my Live account and on demo of Markets.com (CFD's). Either there is a problem to get it on chart at Liquid Markets on demo. Because Liquid offers severall options of instruments (particularly Futures in MT4) I would like to have it on chart in that platform. Can you see a problem rising this issue, because I cannot find.

Thx Marco

Files: