Help! AFL code needed.

#1
hello people,

I am a beginner and need help in coding a trading system in afl. I can code in easy language for multicharts but AFL is a tedhi kheer.

if somebody can code the following easy language code in afl i would be grateful :). any help is appreciable.

{Inputs:
Length (14), OverBought (80), OverSold (20);

Variables:
var0(0), var1(0);

var0 = AverageFC ((Close - lowest(l,length) / (highest(H,length) - lowest(low,length)) * 100), 3);
var1 = AverageFC ( var0, 3);

condition1 = marketposition <> 1
and var0 crosses over var1
and var0 < OverSold;
if condition1 then begin
Buy ("Long") next bar at the market;
end;


condition2 = marketposition <> -1
and var0 crosses under var1
and var0 > OverBought;
if condition2 then begin
SellShort ("Short") next bar at the market;

end;}
 

mastermind007

Well-Known Member
#2
hello people,

I am a beginner and need help in coding a trading system in afl. I can code in easy language for multicharts but AFL is a tedhi kheer.

if somebody can code the following easy language code in afl i would be grateful :). any help is appreciable.

{Inputs:
Length (14), OverBought (80), OverSold (20);

Variables:
var0(0), var1(0);

var0 = AverageFC ((Close - lowest(l,length) / (highest(H,length) - lowest(low,length)) * 100), 3);
var1 = AverageFC ( var0, 3);

condition1 = marketposition <> 1
and var0 crosses over var1
and var0 < OverSold;
if condition1 then begin
Buy ("Long") next bar at the market;
end;


condition2 = marketposition <> -1
and var0 crosses under var1
and var0 > OverBought;
if condition2 then begin
SellShort ("Short") next bar at the market;

end;}
Amibroker is not tedhi kheer.. I only hope, for your sake, that trash does not find out your thread.

In fact, the language you have shared is more verbose and complicated. It seems that trading engine is deeply embedded into the strategy.
 
#3
hello people,

I am a beginner and need help in coding a trading system in afl. I can code in easy language for multicharts but AFL is a tedhi kheer.

if somebody can code the following easy language code in afl i would be grateful :). any help is appreciable.

{Inputs:
Length (14), OverBought (80), OverSold (20);

Variables:
var0(0), var1(0);

var0 = AverageFC ((Close - lowest(l,length) / (highest(H,length) - lowest(low,length)) * 100), 3);
var1 = AverageFC ( var0, 3);

condition1 = marketposition <> 1
and var0 crosses over var1
and var0 < OverSold;
if condition1 then begin
Buy ("Long") next bar at the market;
end;


condition2 = marketposition <> -1
and var0 crosses under var1
and var0 > OverBought;
if condition2 then begin
SellShort ("Short") next bar at the market;

end;}
Simply a %K=stochK(Length, 3) & %D=stochD(Length, 3, 3) cross over.
Buy = Cross(%K, %D) and %K<Oversold
Sell = Cross(%D %K) and %D>OverBought
 
Last edited:

TradeOptions

Well-Known Member
#4
Amibroker is not tedhi kheer. I only hope, for your sake, that trash does not find out your thread.

In fact, the language you have shared is more verbose and complicated. It seems that trading engine is deeply embedded into the strategy.
:rofl::rofl:
If trash finds out this thread, then we are in for a long series of posts on the matter. And moreover he does not bothers about the kind of language that he is using to communicate.

milky bhai, we do not have many EasyLanguage Coders here, although we do have a few experts like mastermind007 who could code anything in AFL.

So I would suggest, if you can explain the LOGIC behind the above EasyLanguage Code, the idea that you want to be coded, then our AFL Experts might be able to give it a shot.

Best Regards
 

Similar threads

Broker Special Offers

Intraday Higher Leverage

Save up to 90% in brokerage and get higher leverage for intraday trades.

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