Simple Coding Help - No Promise.

Re: Please Help me to find this afl

Please Help me to find this afl


I found a picture on this one website that is in google. But did not find txt. Of the afl.

In my opinion this afl is very good to see the fake price movement so that can support buy and sell decision and also. However, the problem is I can not create or know the background of the afl. If pleasent, please help so afl this also be a blessing in need. Thank you for the help.

Thank you very much
here it is. very good tool if you understand it.

Code:
SetBarsRequired(sbrAll,sbrAll);
VolMAP = Param("VolMAP",5,1,400,1); // sets presiod for volume moving avergae
RatMAP = Param("RatMAP",6,1,400,1);// set period for price/volume moving average

PVRat = 1000*C/MA(V,VolMAP); // calculate price/MA(volume) ratio
MAPVR = MA(PVRat, RatMAP); // calculate MA of PV ratio

Plot(PVRat,"Price Volume Ratio",colorBlue,styleLine|styleThick);
Plot(MAPVR,"MAPVR",colorViolet,styleLine|styleThick);
 
hi,:)
I have very limited knowledge of AFL coding I have found code that exactly match my needs but:( when i insert the code to amibroke it stops and return errors No. 29,30, 31,32 about 33 times in different lines I think this could be attributed that this code was developed in previous version of amibroker (2011) and Now i am using amibroker 6.10.
could any one please help me get this code work under my current amibroker version?
Thank you,
Here is the code:

Code:
function TickArray2( Ticker, TickPriceName, NumTicks, Reset )
{
Tickprice = GetRTDataForeign( TickPriceName, Ticker );
PrevVolume = Nz( StaticVarGet( "~TotalVolume_" + TickPriceName ) );
TotVol = GetRTDataForeign( "TotalVolume", Ticker );
StaticVarSet( "~TotalVolume_" + TickPriceName, TotVol );

if ( TotVol > PrevVolume )
{
InIndicator = Status( "Action" ) == 1;
StaticVarSet( "LastQuotePrice", TickPrice );
TA = Null;                                             // Clear Output array
NumTicks = Min( BarCount - 2, NumTicks ); // Stay in array size
for ( n = NumTicks; n >= 0; n-- )
{
T = StaticVarGet( TickPriceName + ( n - 1 ) );
StaticVarSet( TickPriceName + n, T );
TA[ BarCount - 1 - n] = T;     // Fill return array
}
StaticVarSet( TickPriceName + 0, TickPrice );
TA[BarCount-1] = TickPrice;
}
else
{
TA = Null;                                                // Clear Output array
NumTicks = Min( BarCount - 2, NumTicks );     // Stay in array size
for ( n = NumTicks; n >= 0; n-- )
{
T = StaticVarGet( TickPriceName + n );
TA[ BarCount - 1 - n] = T;     // Fill return array
}
}
return TA;
}

function TickArraysReset( TickPriceName )
{
global NumTicks;
StaticVarSet( "Init"+TickPricename, 1 );
for ( n = NumTicks; n >= 0; n-- ) StaticVarRemove( TickPriceName  + n );
}

GraphXSpace = 20;
TickerName = Name();
Clear        = ParamTrigger( "Clear Tick Charts", "CLEAR" );
NumTicks    = Param( "Tick-Array Length", 20, 3, 1000, 1 );

TickPriceName = "Last";
if ( IsNull( StaticVarGet( "Init"+TickPriceName ) ) OR Clear ) TickArraysReset( TickPriceName );
TA = TickArray2( TickerName, TickPriceName, NumTicks, Clear);
Plot( TA, TickPriceName, 1, 1);

TickPriceName = "Bid";
if ( IsNull( StaticVarGet( "Init"+TickPriceName ) ) OR Clear ) TickArraysReset( TickPriceName );
TA = TickArray2( TickerName, TickPriceName, NumTicks, Clear);
Plot( TA, TickPriceName, 4, 1);

TickPriceName = "Ask";
if ( IsNull( StaticVarGet( "Init"+TickPriceName ) ) OR Clear ) TickArraysReset( TickPriceName );
TA = TickArray2( TickerName, TickPriceName, NumTicks, Clear);
Plot( TA, TickPriceName, 5, 1);
 

trash

Well-Known Member
hi,:)
I have very limited knowledge of AFL coding I have found code that exactly match my needs but:( when i insert the code to amibroke it stops and return errors No. 29,30, 31,32 about 33 times in different lines I think this could be attributed that this code was developed in previous version of amibroker (2011) and Now i am using amibroker 6.10.
could any one please help me get this code work under my current amibroker version?
Thank you,
Here is the code:
"I have found... I have found..."
Why don't you put reference link to the original code creator into your post, could you tell me that?! Is that such a difficult task nowadays?
You have copy&pasted from here http://www.amibroker.org/userkb/2011/02/09/collecting-and-plotting-ticks/

The reason got nothing to do with previous versions but it is HTML formatting issue
In HTML these characters

Code:
>
stand for greater than sign
https://www.w3schools.com/HTML/html_entities.asp

So simply replace those four characters with greater than sign.

BTW, most recent final version is 6.20
 
Dear trash,
first of all thank you for your help that worked well:), second I appreciate well what you have mentioned that I have missed to point to the original code creator:oops:, that was not meant mistake, may be the passion to solve the problem made me forgot to point to him:sorry:.
In general, many thanks to Original code creator Herman :D, thank you Trash:), and thanks to thread owner Happy:).
 
str = NumToStr(nbar, 1.0) ;
PlotTextSetFont( str, "Arial", 18, i, pos+Offset, Clrtext );
PlotText(str, i, pos+Offset, Clrtext) ;
Hi,
I am trying to use the formula in 5.90 but when i overlay it. it is showing error. can you plz help.
 
Hello,
Help me with this to code.
I have a 2 Condition to go long say it as "Condition A and Condition B".
Condition A = some condition
Condition B = Go long on the break of the high of the candle of Condition A. (This candle can be any bar after the the Condition A is filled till the entry is reversed.)

Help me Code with Condition B. I think "Barsince.." can be applied but i am not very well with this coding.

thanks
 

HappyLife

Well-Known Member
Hello,
Help me with this to code.
I have a 2 Condition to go long say it as "Condition A and Condition B".
Condition A = some condition
Condition B = Go long on the break of the high of the candle of Condition A. (This candle can be any bar after the the Condition A is filled till the entry is reversed.)

Help me Code with Condition B. I think "Barsince.." can be applied but i am not very well with this coding.

thanks
get the bar number (using barindex) when condition A “True” ……. then store the “High” of that bar ……now check after condition B “true” when it cross/close above store value ........
 
Last edited:

Similar threads