Coding help - page 571

 

Hi, i'm trying to write a label in a separate window but i don't succeed. Where is the error?

int init()

{

string short_name="Test dashboard";

IndicatorShortName(short_name);

ObjectCreate ("Indicator_based", OBJ_LABEL, WindowFind("Test dashboard"), 0, 0);

ObjectSetText ("Indicator_based","+ Trend +", 9, "Verdana", DarkOrange);

ObjectSet ("Indicator_based", OBJPROP_CORNER, 0);

ObjectSet ("Indicator_based", OBJPROP_XDISTANCE, 20);

ObjectSet ("Indicator_based", OBJPROP_YDISTANCE, 20);

thanks

 
Jim Clark:
Thank´s a lot, please tell me what the arrows are ?

Hi Jim Clark,

i think my post was lost in rushy forum where still there are some bugs that site developers looks like just testing and enjoying for get experience how to exchange new bugs with older bugs,lol.but not going to finish. .

as for arrow indicator,that is not for general and usual trading use but for trailing stop loss move,it was especially coded by krelian99 an active senior member of tsd forum on my request and still it needs more features to add,:) .arrow appears on the bar that have one previous and one next bar lower than this arrow bar in down trend,same way,one previous and one next bar higher than arrow bar in up trend,even 1 pip,so logically arrow appears after completion of one next bar,be care about this point,any way code is here ,thanks.

regards

mntiwana

tb-sl_hilo_arrows-v1.3_.mq4

 
mntiwana:

Hi Jim Clark,

i think my post was lost in rushy forum where still there are some bugs that site developers looks like just testing and enjoying for get experience how to exchange new bugs with older bugs,lol.but not going to finish. .

as for arrow indicator,that is not for general and usual trading use but for trailing stop loss move,it was especially coded by krelian99 an active senior member of tsd forum on my request and still it needs more features to add,:) .arrow appears on the bar that have one previous and one next bar lower than this arrow bar in down trend,same way,one previous and one next bar higher than arrow bar in up trend,even 1 pip,so logically arrow appears after completion of one next bar,be care about this point,any way code is here ,thanks.

regards

mntiwana

tb-sl_hilo_arrows-v1.3_.mq4

Hello mntiwana,

no problem, many thank´s for your effort.

Greatings

 

Hello.

I want to modify an indicator like this.

if 5seconds(Time_Limit) passed after current candle open, let the indicator doesn't generate signals.

I made like this but it doesn't work properly.

extern int Time_Limit = 5;

if(SIGNAL && Timecurrent() - Time[0] < Time_Limit*Period())

How can I code if I want to make signal time limit ?

Please help me.

 
t2g:
Hello.

I want to modify an indicator like this.

if 5seconds(Time_Limit) passed after current candle open, let the indicator doesn't generate signals.

I made like this but it doesn't work properly.

extern int Time_Limit = 5;

if(SIGNAL && Timecurrent() - Time[0] < Time_Limit*Period())

How can I code if I want to make signal time limit ?

I attached file.

Please help me.

t2g

change this line

if(SIGNAL && Timecurrent() - Time[0] < Time_Limit*Period())

to this

if(SIGNAL && TimeCurrent() - Time[0] < Time_Limit)

and it should work

 

Hi mladen.

Thanks for your quick reply.

I followed your instruction and it is working now.

you are the best.

Thank you !!

 

hello,

Dear mladen is it possible to disable showing the list of currently open positions on the main chart and change column "Lots" on profit in percentage for the current day?

I will be very thankful for your help

Files:
 

please coders in house can someone help to add alert and if possible pop up notification to this indicator . Got it from fractals thread . Thanks

Files:
 
freakout:
hello,

Dear mladen is it possible to disable showing the list of currently open positions on the main chart and change column "Lots" on profit in percentage for the current day?

I will be very thankful for your help

freakout

What does the "percentage for the current day" mean?

In most of the cases it is varying a lot, and in a lo of cases it is impossible to calculate (since it depends on spread too, and there is no historical spread data)

 
mladen:

freakout

What does the "percentage for the current day" mean?

In most of the cases it is varying a lot, and in a lo of cases it is impossible to calculate (since it depends on spread too, and there is no historical spread data)

I mean "gain in percent" compared to the account balance from the beginning of the day - so, if I had $200 on my account and today I earned $20, it will show a gain of 10% next day profit will be counted from $220 and so on but if it's not possible to do, please disable only showing the list of all open trades - I will be very thankful for help