RichKid
PlanYourTrade > TradeYourPlan
- Joined
- 18 June 2004
- Posts
- 3,031
- Reactions
- 5
kaveman said:I am always happy to help anyone with writing AFL for AB. I am a regular in the AB yahoo group, AB website forum, RC and other places.
kaveman said:I am always happy to help anyone with writing AFL for AB. I am a regular in the AB yahoo group, AB website forum, RC and other places.
wayneL said:I've caused myself an anurism trying to program a chandelier exit that duplicates the one done in metastock using the prev function.
This is my version of it in metamumble code:
mult:=Input("Enter ATR Multiplication Value",1,10,3);
ap:=Input("Enter ATR Lookback",5,50,21);
Stop1:=If(PREV < C,If((x-mult*ATR(ap)) >= PREV,(x- mult*ATR(ap) ),PREV),( x - mult*ATR(ap) ));
x:=Max(Stop1,Ref(stop1,-1));
x;
wayneL said:I've caused myself an anurism trying to program a chandelier exit that duplicates the one done in metastock using the prev function.
This is my version of it in metamumble code:
mult:=Input("Enter ATR Multiplication Value",1,10,3);
ap:=Input("Enter ATR Lookback",5,50,21);
Stop1:=If(PREV < C,If((x-mult*ATR(ap)) >= PREV,(x- mult*ATR(ap) ),PREV),( x - mult*ATR(ap) ));
x:=Max(Stop1,Ref(stop1,-1));
x;
That formula can be simplified and made a little clearer. You'll notice it multiplies by 10,000 but then divides by 100, which is the same as just multiplying by 100.loakglen said:"Divide a $10,000 account by the closing price on any given day. This number is then multiplied by the average range of the stock for the last 200 days. Dividing this number by 100 converts the result to dollars and cents which inturn indicates the possible dollar return on any given day."
I've converted this to:
(10000/C)* (ATR(200)/100)
So is there any difference between LastValue(ARRAY) and ARRAY[BarCount-1]?kaveman said:Lastvalue just gives the absolute last value of an array for that symbol
Okay.This value of FridayHigh will hold true until the next friday occurs
Ah... so that change is a percentage price move value. That makes sense.until the value of close drops by 5% from the last high close
Just thinking, a better idea would be to average the percentage ATR rather than the absolute one. So instead of:GreatPig said:the 200 period ATR is holding on to the older high values, making it look like it's gone up.
GreatPig said:Daniel,
Take a look here.
It's a charting program but I believe you can get live feeds for it, although not from AmiBroker themselves. I only use EOD data myself.
GP
Yeah, you're probably right.kaveman said:might be a good idea to just keep this thread to straight question/answer on using amibroker
DTM said:Now you're definitely speaking Greek to me.
Pardon my ignorance but what is Amibroker? Is it like E-signal and Metastock. Do you get a live feed from Amibroker?
Thanks in advance.
Daniel
You need two periods for an MA crossover. Say you want to use 14 day crossing 50 day, then for a particular stock you can write (using EMA - my preferred one):loakglen said:I want to set buy and sell signals for all positions when theres a 50 day MA crossover (for example) by the xao.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?