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

cheap

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

This time i write it manually all lines, it's still showing error.
again this is not the logic code, it's just the code, which is used by manual .

IT'S SAME LIKE IF THERE'S WORKING AFL, WHICH IS ONE WORKING FOR YOU, IT SHOULD BE SAME IN OTHER AMIBROKER. I WRITE EVERY LINE MANUALLY. AGAIN ERROR.






I can see it, but why is it showing that error when i typed exact code manually again .


It's just weird, typing exact same code, and not showing value column as it shows upper. it's just weird.
I'll come back to main issue.
 
Last edited:

cheap

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

Now i can see value column and but value showing 0 .



Kindly at least see post before

Is this because of database?
i have open high low close volume open interest ,
Is this causing because of open interest or ? just amibroker 6+?

Every code is exact same code..
 
#53
Re: MTF timeframe scan output (Scanning Timeframe not Pattern with single timeframe)

@ cheap :
>>>Is this causing because of open interest or ? just amibroker 6+?
what version 6+ means?

@ No1 :
Did you download the new version for testing to see if you can make the output with just one loop and not any subloop as you said ?
or you just wrote loop with ONLY addcolumn ?

i am not intresting about how some one reads horizontal or vertical the results of the candlesticks at all
but i am inrtesting for my coding skills.. as everyday we learning
thats why i reply on this thread. as you see my name is not really active on this forum
 

trash

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

This time i write it manually all lines, it's still showing error.
again this is not the logic code, it's just the code, which is used by manual .

IT'S SAME LIKE IF THERE'S WORKING AFL, WHICH IS ONE WORKING FOR YOU, IT SHOULD BE SAME IN OTHER AMIBROKER. I WRITE EVERY LINE MANUALLY. AGAIN ERROR.



I can see it, but why is it showing that error when i typed exact code manually again .

It's just weird, typing exact same code, and not showing value column as it shows upper. it's just weird.
I'll come back to main issue.

No, it is not the exactly same code.
Would you actually care to read the error message carefully?
Then you would see that instead of comma you have used dot!
So the only weird issue is that you don't know what you are doing.
 

cheap

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

No, it is not the exactly same code.
Would you actually care to read the error message carefully?
Then you would see that instead of comma you have used dot!
So the only weird issue is that you don't know what you are doing.
Kindly ,May i know , what's wrong in this?

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


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

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

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 = 1;
        
        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"+DateTimeToStr( dt[i] )+"\t"+str);  /// this line has one \t less 
               
    
    
    TimeFrameRestore();

     

}  

SetSortColumns(1, -2, 3,4,5,6,7);


it's april 2016 database
 
Last edited:

cheap

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

@ cheap :
>>>Is this causing because of open interest or ? just amibroker 6+?
what version 6+ means?

@ No1 :
Did you download the new version for testing to see if you can make the output with just one loop and not any subloop as you said ?
or you just wrote loop with ONLY addcolumn ?

i am not intresting about how some one reads horizontal or vertical the results of the candlesticks at all
but i am inrtesting for my coding skills.. as everyday we learning
thats why i reply on this thread. as you see my name is not really active on this forum
it means it's ami new version, most latest is 6.10 that i dont have
 

trash

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

Hi trash,
Can you tell ,what is wrong in this?
Almost everything is wrong.

It does output wrong date because you are using wrong subscript!
Now do yourself a favour and use google, yahoo, bing, ... search on what is meant by subscript.

Timeframe functions are not coded properly and will ultimately lead to new problems once you do next steps.

Also Filter does not belong within loop here. What for? You are dealing with AddRow here.

Also you need to be aware that AddRow does not do any magic things.
It just outputs what you give it to it for output. You yourself have are responsible for its string output because it just does that... outputing text. Nothing more nothing less.

So garbage in, garbage out.

Get a C programming book. Then read AB help.

As for number of loops.. if you want to do it intelligently then actually there are at least 2 loops required. This is in regards to output at single bar.
 

cheap

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

Almost everything is wrong.

It does output wrong date because you are using wrong subscript!
Now do yourself a favour and use google, yahoo, bing, ... search on what is meant by subscript.

Timeframe functions are not coded properly and will ultimately lead to new problems once you do next steps.

Also Filter does not belong within loop here. What for? You are dealing with AddRow here.

Also you need to be aware that AddRow does not do any magic things.
It just outputs what you give it to it for output. You yourself have are responsible for its string output because it just does that... outputing text. Nothing more nothing less.

So garbage in, garbage out.

Get a C programming book. Then read AB help.

As for number of loops.. if you want to do it intelligently then actually there are at least 2 loops required. This is in regards to output at single bar.
you are using wrong subscript!


Is this right description of subscript?


Timeframe functions are not coded properly

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


               
         AddRow(Name()+"\t"+DateTimeToStr( dt[i] )+"\t"+str);  /// this line has one \t less 
               
    
    
    TimeFrameRestore();

     

}
Timeframeset and timeframerestore are two timeframe function , and
all timeframe function used is used in this loop , and one it added with addcolumn(). which timefunction is wrong?

Also Filter does not belong within loop here. What for? You are dealing with AddRow here.


I will move filter outside of loop. filter =1;



Also you need to be aware that AddRow does not do any magic things.
It just outputs what you give it to it for output. You yourself have are responsible for its string output because it just does that... outputing text. Nothing more nothing less.

A ddRow(Name()+"\t"+DateTimeToStr( dt )+"\t"+str); /// this line has one \t less

Do we use addrow in this? what do i need to remove and add in this?

As for number of loops.. if you want to do it intelligently then actually there are at least 2 loops required. This is in regards to output at single bar.


where do we need second loop? second loop in addrow() ?
single bar meaning it doesn't output engulfing bars?
 

trash

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

This is a subscript and represents element of an array.

Code:
[i]
In your example it is wrong to use "i" subscript for dt variable since "i" subscript is part of a loop that iterates through timeframes but not of a barcount loop.

So since you just output occurrences on last bar you may use lastvalue(dt)

----------------------

As for Timeframeset
Read up AB manual

----------------------

As for Filter...
No, Filter = 1 is basically incorrect if output is solely based on Addrow.
Use Filter = 0;

Filter = 1; would create multiple empty rows. "1" stands for "true" (no filtering) and refers to output via Addcolumn for entire array (if "All quotes" in toolbar is chosen). But since there is no Addcolumn output Filter is set to "0" (zero) if you just use AddRow only.

----------------------

single bar meaning it doesn't output engulfing bars?
No, wrong.
 
Last edited:
#60
Re: MTF timeframe scan output (Scanning Timeframe not Pattern with single timeframe)

@ cheap :
>>>Is this causing because of open interest or ? just amibroker 6+?
what version 6+ means?

@ No1 :
Did you download the new version for testing to see if you can make the output with just one loop and not any subloop as you said ?
or you just wrote loop with ONLY addcolumn ?

i am not intresting about how some one reads horizontal or vertical the results of the candlesticks at all
but i am inrtesting for my coding skills.. as everyday we learning
thats why i reply on this thread. as you see my name is not really active on this forum

I dont need to run new version of ami or even write the code and get in ami to say if it requires one or two loops.

@cheap
The version that you want, with one line per timeframe for each stock will require only 1 loop when used with addrow.

This is basic coding skill that you clearly lack. I would like to again reiterate what trash wrote, you need to read up about basic coding.

Alternatively, consider paying a programmer. The rate at which you are going, you will take a few years before you can work out this code on your own.

-- nol1lives4ever
 
Last edited:

Similar threads