MTF timeframe scan output (Scanning Timeframe not Pattern with single timeframe) p2

sr114

Well-Known Member
#11
Re: MTF timeframe scan output (Scanning Timeframe not Pattern with single timeframe)

Here is some further hint on how to go about doing this for the originally requested code:

  • Run a loop that iterates once for each timeframe
  • in each iteration of the loop, check for the pattern that you want to scan and save it in a variable
  • at the end of each iteration of the loop, make a single call to addrow and print out the currently iterating timeframe for each pattern that showed up in the scan.
  • sr114 has given hints on how to get output under a specific column
  • @cheap, your attempt at random coding will not solve the problem.

-- no1lives4ever
no1lives4ever

no need to run the timeframe statement - the loop will do the needful as we are acting on a single time frame for pattern checking on a requiste nos of bar
 
#12
Re: MTF timeframe scan output (Scanning Timeframe not Pattern with single timeframe)

no1lives4ever

no need to run the timeframe statement - the loop will do the needful as we are acting on a single time frame for pattern checking on a requiste nos of bar
Here is partial ami code of what I was looking to do. This code will need to be further expanded.

Code:
addtextcolumn("#", "pattern1");
addtextcolumn("#", "pattern2");
for(i=0;i<=60;i++) {
   // Set timeframe
   rowstr = "";
   if(pattern1 condition) {
       rowstr = rowstr + numtostr(i);
   } 
   rowstr = rowstr + "\t";
   pattern2 = false;
   if(pattern 2 condition) {
       rowstr = rowstr + "\t";
   }
   addrow(rowstr);
}
 

sr114

Well-Known Member
#13
Re: MTF timeframe scan output (Scanning Timeframe not Pattern with single timeframe)

may be this can help u - may be

Code:
SetOption("NoDefaultColumns", True ); 
dt=DateNum();
Filter = 0; 
cls=Close;
AddColumn( Close, "Column1" );
AddColumn( Null, "Column2" ); 
AddColumn( Null, "Column3" ); 
AddColumn( Null, "Column4" ); 

for( i = 0; i < 10; i++ ) 
{ 
   AddRow( StrFormat(Name()+"\t"+DateTimeToStr( dt[i] ) +"\t"+ cls+"\t#"+"row %g fourth column", i ) );
   
}
 

cheap

Active Member
#14
Re: MTF timeframe scan output (Scanning Timeframe not Pattern with single timeframe)

Hi,
I tried to make script like below , but again i'm failed


Code:
SetOption("NoDefaultColumns", True );
AddTextColumn( Name(), "Ticker",1, colorDefault,colorDefault, 50);
AddTextColumn( FullName(), "Company",1, colorDefault,colorDefault,250);
AddColumn( Close, "Close" );
AddTextColumn("#", "BullBar");
AddTextColumn("#", "BearBar");
AddTextColumn("#", "Bull Engulfing");
Filter = 1;

for ( i = 20; i <= 50; i++ ) // 1minute to 30minute
{
TimeFrameSet( i * in1Minute );

O1 = Ref(O,-1); 
C1 = Ref(C,-1);
MP = (H+L)/2;
R = H-L;


//-- Condition 
blBar=C>MP AND O>MP;
brBar=C<MP AND O<MP;

blEngulf = ((O1>C1) AND (C>O) AND (C>=O1) AND (C1>=O) AND ((C-O)>(O1-C1)));
brEngulf = ((C1>O1) AND (O>C) AND (O>=C1) AND (O1>=C) AND ((O-C)>(C1-O1)));

ss = ((R>4*(O-C)) AND ((H-C)/(.001+R)>= 0.75) AND ((H-O)/(.001+R)>= 0.75));

for ( i = 20; i <= 50; i++ ) // 1minute to 30minute
{
   AddRow( StrFormat( "row %g" \t" +"\t" + "\t" + "\t" [missing "] second column", i ) );


}

TimeFrameRestore();


}



If person can write code, i might learn faster, but yes this way it also good but takes so long time, i did too .
in my solution i want solution like upper one, i.e. let's make only one.

So if original coder can help something, it might be better .
i tried to tweak lot of things , and tried to contact folks also, they're also failed in this.
I mean to say, they can show the solution it gonna be like this, but they can't make afl like upper.
I learn faster with code.

I can't stop few person, they're very shameful person, after saying lot of times, they not gonna listen a dime about it.
i can't be programmer in one day , i'm not ruining anyone thread, i'm just writing in my thread, Irony is that i can't even control my thread.

thanks for sr for letting me know
Kelvin and few folk,poster, my background team(unsuccessful), anonymous reader , if anyone of you come up with it , kindly post it here. few folk can feel me, yes you are
i will learn faste
r.

i never force anyone to write anything ,
People who wants to do it, they did it

Hi, reader, for getting this piece of code,which is not right now,but again for getting this, it was tough, For you guys, if you had same idea before, you get it , and i get abused again and again . i faced and YOU got something, as for sympathy kindly help if you can . i'm saying to all of you readers, kindly post when you really want to without saying bad things
someone messaged me .
==============REFER TO 101===========
Q: We're not here for your stuff, what will i get it ?
my answer: Sorry for that, Kindly sorry.

Q: if you're not programmer, then we can't do anything? just this and that.. (never saying a bad word about this and that) person who not invited and start saying anything. YOU ALL ARE INVITED ONES DON'T HESITATE EXCEPT FEW
my answer: Did i invited you here? (his ans: No) So Mr. or Mrs. when i am not forcing them to code, people coming here only they want to help ,why are you doing it.

==================================

iF PERSON START TO SAY AGAIN SAME STUFF , KINDLY YOU CAN REFER TO HIM, TO 101
SAY TO HIM KINDLY READ 101, AND KINDLY DONT MAKE THIS PLACE DIRT AS YOU ARE


People who wants to not get solved, they also tried it.
Simply i didn't forced .
If anyone of you wants to do it, kindly help.
i've no idea, who don't share what kind of relationship with helper or in other forms, as whoever helped me, it was my duty that atleast atleast i say thanks and appreciate them which is more than thanks .
 
Last edited:

KelvinHand

Well-Known Member
#15
Re: MTF timeframe scan output (Scanning Timeframe not Pattern with single timeframe)

Hi,
I tried to make script like below , but again i'm failed


Code:
SetOption("NoDefaultColumns", True );
AddTextColumn( Name(), "Ticker",1, colorDefault,colorDefault, 50);
AddTextColumn( FullName(), "Company",1, colorDefault,colorDefault,250);
AddColumn( Close, "Close" );
AddTextColumn("#", "BullBar");
AddTextColumn("#", "BearBar");
AddTextColumn("#", "Bull Engulfing");
Filter = 1;

for ( i = 20; i <= 50; i++ ) // 1minute to 30minute
{
TimeFrameSet( i * in1Minute );

O1 = Ref(O,-1); 
C1 = Ref(C,-1);
MP = (H+L)/2;
R = H-L;


//-- Condition 
blBar=C>MP AND O>MP;
brBar=C<MP AND O<MP;

blEngulf = ((O1>C1) AND (C>O) AND (C>=O1) AND (C1>=O) AND ((C-O)>(O1-C1)));
brEngulf = ((C1>O1) AND (O>C) AND (O>=C1) AND (O1>=C) AND ((O-C)>(C1-O1)));

ss = ((R>4*(O-C)) AND ((H-C)/(.001+R)>= 0.75) AND ((H-O)/(.001+R)>= 0.75));

for ( i = 20; i <= 50; i++ ) // 1minute to 30minute
{
   AddRow( StrFormat( "row %g" \t" +"\t" + "\t" + "\t" [missing "] second column", i ) );


}

TimeFrameRestore();


}



If person can write code, i might learn faster, but yes this way it also good but takes so long time, i did too .
in my solution i want solution like upper one, i.e. let's make only one.

So if original coder can help something, it might be better .
i tried to tweak lot of things , and tried to contact folks also, they're also failed in this.
I mean to say, they can show the solution it gonna be like this, but they can't make afl like upper.
I learn faster with code.

I can't stop few person, they're very shameful person, after saying lot of times, they not gonna listen a dime about it.
i can't be programmer in one day , i'm not ruining anyone thread, i'm just writing in my thread, Irony is that i can't even control my thread.

thanks for sr for letting me know
Kelvin and few folk, my background team, anonymous reader , if anyone of you come up with it , kindly post it here. few folk can feel me, yes you are
i will learn faste
r.

i never force anyone to write anything ,
People who wants to do it, they did it

Hi, reader, for getting this piece of code,which is not right now,but again for getting this, it was tough, For you guys, if you had same idea before, you get it , and i get abused again and again . i faced and YOU got something, as for sympathy kindly help if you can . i'm saying to all of you readers, kindly post when you really want to without saying bad things
someone messaged me .
==============REFER TO 101===========
Q: We're not here for your stuff, what will i get it ?
my answer: Sorry for that, Kindly sorry.

Q: if you're not programmer, then we can't do anything? just this and that.. (never saying a bad word about this and that) person who not invited and start saying anything. YOU ALL ARE INVITED ONES DON'T HESITATE EXCEPT FEW
my answer: Did i invited you here? (his ans: No) So Mr. or Mrs. when i am not forcing them to code, people coming here only they want to help ,why are you doing it.

==================================

iF PERSON START TO SAY AGAIN SAME STUFF , KINDLY YOU CAN REFER TO HIM, TO 101
SAY TO HIM KINDLY READ 101, AND KINDLY DONT MAKE THIS PLACE DIRT AS YOU ARE


People who wants to not get solved, they also tried it.
Simply i didn't forced .
If anyone of you wants to do it, kindly help.
i've no idea, who don't share what kind of relationship with helper or in other forms, as whoever helped me, it was my duty that atleast atleast i say thanks and appreciate them which is more than thanks .
I Know you are not programmer.
I Know you cannot learn anything in 1 day.
I Know you do your best to try.
I Know even I reveal the minor different in AddRow,
I expected you will face the difficulty to organise the sequence.

As a Gangster in other world, Are you losting your fighting spirit, Are you now giving-up?
 
Last edited:
#16
Re: MTF timeframe scan output (Scanning Timeframe not Pattern with single timeframe)

Hi,
I tried to make script like below , but again i'm failed


Code:
SetOption("NoDefaultColumns", True );
AddTextColumn( Name(), "Ticker",1, colorDefault,colorDefault, 50);
AddTextColumn( FullName(), "Company",1, colorDefault,colorDefault,250);
AddColumn( Close, "Close" );
AddTextColumn("#", "BullBar");
AddTextColumn("#", "BearBar");
AddTextColumn("#", "Bull Engulfing");
Filter = 1;

for ( i = 20; i <= 50; i++ ) // 1minute to 30minute
{
TimeFrameSet( i * in1Minute );

O1 = Ref(O,-1); 
C1 = Ref(C,-1);
MP = (H+L)/2;
R = H-L;


//-- Condition 
blBar=C>MP AND O>MP;
brBar=C<MP AND O<MP;

blEngulf = ((O1>C1) AND (C>O) AND (C>=O1) AND (C1>=O) AND ((C-O)>(O1-C1)));
brEngulf = ((C1>O1) AND (O>C) AND (O>=C1) AND (O1>=C) AND ((O-C)>(C1-O1)));

ss = ((R>4*(O-C)) AND ((H-C)/(.001+R)>= 0.75) AND ((H-O)/(.001+R)>= 0.75));

for ( i = 20; i <= 50; i++ ) // 1minute to 30minute
{
   AddRow( StrFormat( "row %g" \t" +"\t" + "\t" + "\t" [missing "] second column", i ) );


}

TimeFrameRestore();


}



If person can write code, i might learn faster, but yes this way it also good but takes so long time, i did too .
in my solution i want solution like upper one, i.e. let's make only one.

So if original coder can help something, it might be better .
i tried to tweak lot of things , and tried to contact folks also, they're also failed in this.
I mean to say, they can show the solution it gonna be like this, but they can't make afl like upper.
I learn faster with code.

I can't stop few person, they're very shameful person, after saying lot of times, they not gonna listen a dime about it.
i can't be programmer in one day , i'm not ruining anyone thread, i'm just writing in my thread, Irony is that i can't even control my thread.

thanks for sr for letting me know
Kelvin and few folk, my background team, anonymous reader , if anyone of you come up with it , kindly post it here. few folk can feel me, yes you are
i will learn faste
r.

i never force anyone to write anything ,
People who wants to do it, they did it

Hi, reader, for getting this piece of code,which is not right now,but again for getting this, it was tough, For you guys, if you had same idea before, you get it , and i get abused again and again . i faced and YOU got something, as for sympathy kindly help if you can . i'm saying to all of you readers, kindly post when you really want to without saying bad things
someone messaged me .
==============REFER TO 101===========
Q: We're not here for your stuff, what will i get it ?
my answer: Sorry for that, Kindly sorry.

Q: if you're not programmer, then we can't do anything? just this and that.. (never saying a bad word about this and that) person who not invited and start saying anything. YOU ALL ARE INVITED ONES DON'T HESITATE EXCEPT FEW
my answer: Did i invited you here? (his ans: No) So Mr. or Mrs. when i am not forcing them to code, people coming here only they want to help ,why are you doing it.

==================================

iF PERSON START TO SAY AGAIN SAME STUFF , KINDLY YOU CAN REFER TO HIM, TO 101
SAY TO HIM KINDLY READ 101, AND KINDLY DONT MAKE THIS PLACE DIRT AS YOU ARE


People who wants to not get solved, they also tried it.
Simply i didn't forced .
If anyone of you wants to do it, kindly help.
i've no idea, who don't share what kind of relationship with helper or in other forms, as whoever helped me, it was my duty that atleast atleast i say thanks and appreciate them which is more than thanks .
The answer is here and you refuse to see it. You need to pay more attention to the help that others have been giving you, rather than think that people are out to get you.

-- no1lives4ever
 

cheap

Active Member
#17
Re: MTF timeframe scan output (Scanning Timeframe not Pattern with single timeframe)

I Know you are not programmer.
I Know you cannot learn anything in 1 day.
I Know you do your best to try.
I Know even I reveal the minor different in AddRow,
I expected you will face the difficulty to organise the sequence.

As a Gangster in other world, Are you losting your fighting spirit, Are you now giving-up?
Hi Kelvin,
Thanks. i posted this here nly .
I should not give up, but process is so longer, yesterday i spent 14 hour straight here , got stressed because of a guy. Traderji closed my thread, not close this guy from thread.
few people told me to use time in right things, so i got demotivated.
AddRow( StrFormat( "row %g" \t" +"\t" + "\t" + "\t" [missing "] second column", i ) );


what do i need to type here to make addrow a timeframe under BullBar column.?

But no, i should not give up .
Thanks for your words
 
Last edited:

KelvinHand

Well-Known Member
#18
Re: MTF timeframe scan output (Scanning Timeframe not Pattern with single timeframe)

OK. Let end all these mind torturing to you.

Here the code
The addRow sequence, I don't think I done it right, but the basic concept is there.
Ask your gang to check out and modify it to the correct candlestick and correct timeframe.
then post the corrected version to here & the other forum.
Hope you can do it for me.


PHP:
Version(6.0);
SetOption("NoDefaultColumns", True );


AddTextColumn( Name(), "Ticker",1, colorDefault,colorDefault, 80);
//AddTextColumn( FullName(), "Company",1, colorDefault,colorDefault,100);
AddColumn( DateTime() , "Date", formatDateTime, colorDefault,colorDefault, 80 );

        
AddTextColumn("#", "BullBar"); 
AddTextColumn("#", "BearBar"); 
AddTextColumn("#", "Bull Engulfing"); 
AddTextColumn("#", "Bear Engulfing"); 
AddTextColumn("$", "Shorting Star"); 


for ( i = 1; i <=15; i++ ) 
{
    TimeFrameSet( i * in1Minute );

        O1 = Ref(O,-1); 
        C1 = Ref(C,-1);
        MP = (H+L)/2;
        R = H-L;
        
        
        //-- Condition 
        
        blBar=C>MP AND O<MP;
        brBar=C<MP AND O>MP;

        blEngulf = ((O1>C1) AND (C>O) AND (C>=O1) AND (C1>=O) AND ((C-O)>(O1-C1)));
        brEngulf = ((C1>O1) AND (O>C) AND (O>=C1) AND (O1>=C) AND ((O-C)>(C1-O1)));
        
        ss = ((R>4*(O-C)) AND ((H-C)/(.001+R)>= 0.75) AND ((H-O)/(.001+R)>= 0.75));
    
            
        Filter = blBar OR brBar OR blEngulf OR brEngulf;
        
        if ( NOT LastValue(Filter) ) break;
        
        
        x= StrFormat("%02g-min", i);
        str = "";
        str = str + WriteIf(blBar,    x, "\t");
        str = str + WriteIf(brBar,    x, "\t");
        str = str + WriteIf(blEngulf, x, "\t")+
        str = str + WriteIf(brEngulf, x, "\t")+
        str = str + WriteIf(ss,       x, "");
              
               
        AddRow(Name()+"\t\t\t"+str);
               
    
    
    TimeFrameRestore();

     

}  

SetSortColumns(1, -2, 3,4,5,6,7);
# # # # End & Close Case # # # #

Think this way, nobody against you this place or the other place. just to let you learn a lesson.
Don't take it too hard.
 
Last edited:

cheap

Active Member
#19
Re: MTF timeframe scan output (Scanning Timeframe not Pattern with single timeframe)

Thank you Kelvin.
I will try to read every line of code and try to understand it, this way i will learn so faster.

I pasted code and

I got output as above , i can't see timeframe there, let me increase database more and more and let's see if i get something on columns.
but this scans last bar ? even if we increase dates from Filter Range?

but first let me increase database more i only have few month database.

Haters get 100likes i don't care , but Kindly plz , trust me hate mongers just come to preach hate and laugh at there place. there're lot of ugly faces readers, who like hate comment and get code , do nothing. Kindly show your appreciation if you don't know something .
SHOW APPRECIATION TO ALL HELPER
KINDLY SHOW APPRECIATION FOR THIS GUY, HE'S SAVIOUR. WHAT HE'S DONE, PEOPLE CAN'T DO IN THEIR LIFE

WHETHER THIS CODE SAME AS UPPER PIC OR NOT, WE CAN TRY FOR IT, BUT BEFORE THIS (IMP), KINDLY SHOW APPRECIATION WHO HELPS YOU. AGAIN I SAY PEOPLE COME HERE WHEN THEY FEEL YOU , WANT TO BLESS YOU , THIS PLACE NEVER BEEN A DIRT, SOMEONE TRIED IT , AGAIN SHOW YOUR LOVE AND APPRECIATION
 
Last edited:

KelvinHand

Well-Known Member
#20
Re: MTF timeframe scan output (Scanning Timeframe not Pattern with single timeframe)

Thank you Kelvin.
I will try to read every line of code and try to understand it, this way i will learn so faster.

I pasted code and

I got output as above , i can't see timeframe there, let me increase database more and more and let's see if i get something on columns.
but this scans last bar ? even if we increase dates from Filter Range?

but first let me increase database more i only have few month database.

Haters get 100likes i don't care , but Kindly plz , trust me hate mongers just come to preach hate and laugh at there place.
SHOW APPRECIATION TO ALL HELPER
KINDLY SHOW APPRECIATION FOR THIS GUY, HE'S SAVIOUR. WHAT HE'S DONE, PEOPLE CAN'T DO IN THEIR LIFE
try apply to filter, range: 1 recent bar(s)
 

Similar threads