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

cheap

Active Member
#1
I will continue my discussion in this new thread of old thread MTF timeframe scan output (Scanning Timeframe not Pattern with single timeframe)


Since he came here for this thread , he is successful in closing my thread,
I made that thread with very hard work and this person come and ruined my effort.

Kindly Traderji Administrator, Is there any other way than this? I don't want to get closed that thread .
but for meanwhile i will start discussing here .
Kindly Traderji Administrator, Kindly allow me.
I get scare if these people again come and ruined this thread too.
Kindly Administrator, without you i can't do anything here, i just don't want these folks to ruin my thread
Kindly don't lock it.
these people come for two days , i was running this thread for 1 week, they come for 2 days and locked my thread, I'm literally begging to Traderji Moderator, Kindly don't let close down this thread .

Kindly Shameful people, if you have any shame left, kindly dont post here and dont thanks here . If you have nothing to say left.
I can hear abuse from any person , but not like this shameful people who harass after 7 years

If you have solved problem, you are great person, Kindly dont tell and suggest anything , I don't want your code, keep it with you .. Don't give any lecture here Kindly Traderji Moderator , because of this person i lost my thread.

Now i don't want to make this place a hostile place like he made my thread , i only talk about trading relevent topic .
 
Last edited:

cheap

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

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\tsecond column", i ) );

}

TimeFrameRestore();


}
output is:


by 5.91.1
Addrow() function was wrong at first , it should be
AddRow( StrFormat( "row %g\tsecond column", i ) );
and it should be in loop, but it should be in different another loop, or can we use it in the same loop?

AddRow( StrFormat( "row %g\tsecond column", i ) );
i typed this in code, and i got ouput as pic above, where on the left hand side it's shown row under ticker and second column under company .. i.e. if i change second column to third column it does shows in company again.
I guess it's because i didn't put right value in addrow.

if we think amibroker as an excel , our BullBar is D column and 1st row so it's like d1 i guess addrow() finds things like this .
so one vertical column is bullbar that i need to put in addrow() i guess AddRow( StrFormat( "row %g\tblbar", i ) ); i tried to put this code, it again showing under company this bullbar is written in under company .. So what could be the way?

 
Last edited:

sr114

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

by 5.91.1
Addrow() function was wrong at first , it should be
AddRow( StrFormat( "row %g\tsecond column", i ) );
and it should be in loop, but it should be in different another loop, or can we use it in the same loop?

AddRow( StrFormat( "row %g\tsecond column", i ) );
find what \t does and u will get ur answer
 
#4
Re: MTF timeframe scan output (Scanning Timeframe not Pattern with single timeframe)

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\tsecond column", i ) );

}

TimeFrameRestore();


}
output is:


by 5.91.1
Addrow() function was wrong at first , it should be
AddRow( StrFormat( "row %g\tsecond column", i ) );
and it should be in loop, but it should be in different another loop, or can we use it in the same loop?

AddRow( StrFormat( "row %g\tsecond column", i ) );
i typed this in code, and i got ouput as pic above, where on the left hand side it's shown row under ticker and second column under company .. i.e. if i change second column to third column it does shows in company again.
I guess it's because i didn't put right value in addrow.

if we think amibroker as an excel , our BullBar is D column and 1st row so it's like d1 i guess addrow() finds things like this .
so one vertical column is bullbar that i need to put in addrow() i guess AddRow( StrFormat( "row %g\tblbar", i ) ); i tried to put this code, it again showing under company this bullbar is written in under company .. So what could be the way?
You are clearly trying to randomly add code and seeing how that works.

This will most likely not work. But if it works, but it may take a lot of trial and error and a few years before you end up with proper working code.

Another option would be to learn about the basics of programming. All you need to learn are about basic program flow, variables, conditional statements and loops. Most beginner programming books will cover this in the span of 30-40 pages.

In past I have been able to teach these concepts to school kids in the span of a few classes.

You can either follow this advice and be on your road to becoming a programmer capable of writing proper AFL code, or you can continue believing that others are out to get you and spoil your day.

I wonder if anyone will give you the desired AFL for free w/o seeing some concentrated effort from your end.

-- no1lives4ever
 

cheap

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

find what \t does and u will get ur answer
Hi sr,
it's tab space Escape sequence operator.
it gives space between words or text.
How does it help in this?

AddRow( StrFormat( "row %g\tsecond column", i ) );

How do i get characters under Bullbar vertical column?

Traderji Moderator, Can i beg to you , I don't want this person to be here! Please kindly i don't his suggestion response nothing ! He again doing same thing .. what he has done last night , Please Kindly dont let him come in my thread, I already lost one thread, Can you please do it?
I'm illiterate person Kindly excuse me. and he not gonna stop , Kindly moderator i requested for not allowing this person instead i get thread closed.
I don't want his suggestion , why is he giving me ?

i again saying get 100 likes for your stuff, i don't care! and Moderator please don't close my thread, close this person from thread.
Why he ruining my every thread, Kindly moderator only you can stop him.
 
Last edited:
#6
Re: MTF timeframe scan output (Scanning Timeframe not Pattern with single timeframe)

Hi sr,
it's tab space Escape sequence operator.
it gives space between words or text.
How does it help in this?

AddRow( StrFormat( "row %g\tsecond column", i ) );

How do i get characters under Bullbar vertical column?
Here is a hint. Try to make changes to this code and see how it changes the output.

This is where your problem lies. Someone here clearly mentions what you need to look at, but you are not trying to see what the person suggested. Instead you are applying your heavily incomplete knowledge and in the process missing out on what others are trying to tell you.

I would again like to repeat that you need to learn about basic things like variables, conditional statements and loops. Without that you are shooting in the dark.

-- no1lives4ever
 

sr114

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

Hi sr,
it's tab space Escape sequence operator.
it gives space between words or text.
How does it help in this?

AddRow( StrFormat( "row %g\tsecond column", i ) );

How do i get characters under Bullbar vertical column?
the \t sequence helps to move from 1 col to another col

eg, - in the exploration if we need to access the 4th col the the t sequence is as "\t",.......,"\t",......"\t",......,"\t"
 

sr114

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

the \t sequence must be continuous for the addrow statement to work.

now this continuity - how 1 can achieve it is dependent on him/her - - has to devise by ownself

one way is the addition [+] usage
 

sr114

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

AddRow( StrFormat( "row %g"\t"+"\t"+"\t"+"\t"second column", i ) );

AddRow( StrFormat( "row %g" \t" +"\t" + "\t" + "\t" [missing "] second column", i ) );

this is the error = becoming a bunch of string whereas addrow accepts a single string

Cheap, how u will overcome this is upto u - u have to devise the way.
 
#10
Re: MTF timeframe scan output (Scanning Timeframe not Pattern with single timeframe)

AddRow( StrFormat( "row %g"\t"+"\t"+"\t"+"\t"second column", i ) );

AddRow( StrFormat( "row %g" \t" +"\t" + "\t" + "\t" [missing "] second column", i ) );

this is the error = becoming a bunch of string whereas addrow accepts a single string

Cheap, how u will overcome this is upto u - u have to devise the way.
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.

@cheap, if you want a fully working solution, just ask nicely. Why do you need to act over smart and try to force an answer from others. If you are not capable of writing the code, then it is an easy matter of saying the same and asking for genuine help. You even fail to see the answer when others give it out to you, instead you chose to attack others personally.

-- no1lives4ever
 

Similar threads

Zerodha – Open Paperless Account

Open online account with Zerodha. Free delivery trading and Max Rs 20 for Intraday, F&O, Currency and Commodity Trading. Intraday High leverage with MIS, CO and BO.

Name:Phone:
Email:City:
State:
Are you a day trader?