cant define percent band in a variable

#1
Hi Everyone,

This might be a very easy question for all but I cant define Percent Band in Amibroker in a variable. :(

This is the code I want to achieve

Code:
AA = %EnvTop (Close,20,10);
But I am always getting Error 29: Variable not initialized. I also tried putting quotation marks, apostrophies but still no luck. Please help bros.
 

KelvinHand

Well-Known Member
#2
Hi Everyone,

This might be a very easy question for all but I cant define Percent Band in Amibroker in a variable. :(

This is the code I want to achieve

Code:
AA = %EnvTop (Close,20,10);
But I am always getting Error 29: Variable not initialized. I also tried putting quotation marks, apostrophies but still no luck. Please help bros.
You want to program amibroker, why you never LEARN from the basic ?

If you LEARN from the basic, you will know AFL is a 'C-like' programming language, you will know it is impossible to use '%' with variable.

if you LEARN to check up the help guide, you will know for yourself there is no such command as "EnvTop".

if you LEARNed, you will not say "Still no Luck".

if you still feel "no Luck", then you need to LEARN Google.

If you never LEARN 'C-like' programming language before, then google "C programming", you will find the information for LEARNING 'C'.
Then think in 'C' not 'A' for programming Amibroker AFL.
'A' is alien language to Amibroker.


IF you know how to google "amibroker Percent Band", you will find your solution.

#### End of LEARNING !!! ####
 
Last edited:
#3
dude im not sure what your going thru right now coz im just seeking advice but dont assume I havent done any other AFLs on my own coz I have several already done by self studying.

I maybe not as good as you that is why im asking here in the forum hoping that this forum is a group of people seeking to help and learn from each other.

You could have just answered straight IF you really know the answer. And if we'd exchange places, ill just help people out without being grumpy about it.

Thanks for your very helpful response bro, i really appreciate it.
 

rmike

Well-Known Member
#4
In a way Kelvin is quite right, and did give you good advice :)

Percent Bands is already available as a pre programmed function in amibroker and is not required to be 'reinvented'

Just to point you in the right direction

The AA (% Band Envelope Top) that you want to define as a variable, with 'Close' & width 2 is

AA = (1 + Width * 0.01) * CenterLine;

With Price Field chosen as Close and Width chosen as 2, in the params window

Mess around with this for a bit, am sure you'll get it
 

KelvinHand

Well-Known Member
#5
dude im not sure what your going thru right now coz im just seeking advice but dont assume I havent done any other AFLs on my own coz I have several already done by self studying.

I maybe not as good as you that is why im asking here in the forum hoping that this forum is a group of people seeking to help and learn from each other.

You could have just answered straight IF you really know the answer. And if we'd exchange places, ill just help people out without being grumpy about it.

Thanks for your very helpful response bro, i really appreciate it.
Do not mistaken, nothing wrong with me, this is just a general guideline developed based on your situation for you and all.

I am also a self learner. I self learn the programming from Basic to pascal to Java, C/C++/C# and Trading platform from Metastock to Metatrader, TradeStation ...etc all from Internet. Therefore my guideline include re-search on internet once you face problem.


if you mentioned that you have self learn & done others AFLs on your own, then this basic errors should not occurs.

Don't feel anything bad on these, sometimes some experts solving cases here that they think impossible or esp. trapped by the looping issue, and never find the solution, but i went back to basic and remove statement 1 by 1 to do the debug. It solved the issue and found the problem is not in the looping.


I see you stuck in a way that you are unable to unlock yourself, so from my experience to come out with this guidelines, hope you can figure out your own AHA moment.

My this kind of not to "spoon feed you' method did do well in the past, too bad if did not work for you.

I don't look down any of you, especially self learner. welcome you willing to contribute your help here.
 
Last edited:

Similar threads