Dailylosers(Function) not working properly?

hizhik

Newbie
Messages
2
Likes
0
Hey, guys!
I wanted to solve a simple problem but can't get through for several days. I want to limit trading activity of my system depending on dailylosers. But it turned out that this fuction is not working properly, or what is more likely to be true - i'm a bit slow:rolleyes:
I simply want to built an indicator first:
_________________________
Value1=DAILYLOSERS(DATE);
PLOT(Value1, "DAilyLosers");
_________________________
But when I apply this indicator to my strategy it returns a zero line.
Then I started to dig into the function DAILYLOSERS and it seemed pretty strange to me, I mean the way it is written.
I would be grateful if you hint how to identyfy the number of losing trades for each day.

Thank you
PS my system works intraday
 
Hi hizhik,

The DailyLosers function only works in a Strategy or a called Function within a Strategy, and will not work in any other indicator or analysis technique study type.

Thanks

Prathapjay
 
Hi, Prathap!
Thank you for your answer.

The thing is that I want to make an indicator first that would show the number of losing trades for each day. It will return to 0 each time the new day starts. In my region the market starts at 10:00.

Next I would like to insert the following logic into my trading strategy:
___________
If the number of losing trades a day is more than a desired number (i.e.5) - then stop trading for today (do not open new trades). The next trade can be done only tommorrow.
___________
My variant was:
____________
inputs: SD(5);
vars: stopdate(0);

if DAILYLOSERS(Date)=SD then
begin
StopDAte=date;
end;
if {some open conditions and} date>StopDate then buy next bar at open;
_______________
But it did not work properly((

Alex

prathapjay said:
Hi Hizhik,

The DailyLosers function only works in a Strategy or a called Function within a Strategy, and will not work in any other indicator or analysis technique study type.

It can be programmed with some different logic if you provide the plotting rules.

Thanks

Prathap
 
Top