Simple Coding Help - No Promise.

Does anybody knows following AFL or atleast a version of it ? According to me, it is using traling stop loss. But I have no idea how they are making it or calculating it. But if you have any idea, then please let me know.

03_POWERGRID_2_1.png
03_POWERGRID_2_1.png


Trading Image.jpg
Trading Image.jpg
 

okabira

Well-Known Member
Pro coders bhai log..

how to count number of bars that were green ; C>O
and that were red ; C<O

anyone know how to count just green and red bars from 9:15

thanks
 
Pro coders bhai log..

how to count number of bars that were green ; C>O
and that were red ; C<O

anyone know how to count just green and red bars from 9:15

thanks
I am also looking over the same problem. Do we have any AFL like this ?

If we even have a similar AFL like this, we can start changing it to match with the above given AFL.


Main problem is with the trailing stop loss values. How they are calculated ?
 

okabira

Well-Known Member
I am also looking over the same problem. Do we have any AFL like this ?

If we even have a similar AFL like this, we can start changing it to match with the above given AFL.


Main problem is with the trailing stop loss values. How they are calculated ?
type stoploss AFL in google you will get that
 

travi

Well-Known Member
Code:
TN=TimeNum();
StartTime=TN>=091500;
GreenC=C>O;
RedC=C<O;
GreenCount=SumSince(StartTime,GreenC);
RedCount=SumSince(StartTime,RedC);
Nice code :D You could modify it if bars in range is greater than one day or some other problem where user bars are more than 1 day.

Code:
Today = LastValue(Day()) == Day();
TN=TimeNum();
StartTime=TN>=091500;
If(Today AND StartTime)
{
    GreenC=C>O;
    RedC=C<O;
    GreenCount=SumSince(StartTime,GreenC);
    RedCount=SumSince(StartTime,RedC);
}
 

LOVEENAJYOTHI

Well-Known Member
Nice code :D You could modify it if bars in range is greater than one day or some other problem where user bars are more than 1 day.

Code:
Today = LastValue(Day()) == Day();
TN=TimeNum();
StartTime=TN>=091500;
If(Today AND StartTime)
{
    GreenC=C>O;
    RedC=C<O;
    GreenCount=SumSince(StartTime,GreenC);
    RedCount=SumSince(StartTime,RedC);
}
Thank you , always learn something new frm u. U remind me of @mastermind007 .
 

Similar threads