[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] One night stand code



PureBytes Links

Trading Reference Links

Hi all

Is anyone able to convert this tradestation code into AFL?

It is the "One night stand" code from  Joe krutsinger and is supposed to be a very robust system for trading the currencies.

INPUT: Multi(0);
INPUT: daysin(0);
VAR: Cons(0), AboveMA(TRUE);

IF Multi=1 THEN
Cons = 5000 / ( StdDev( Close - Close[1], 30) * BigPointValue)
ELSE
Cons = 1;

IF Cons Average(Close, 40);

IF DayofWeek(Date)=4 AND AboveMA=TRUE
THEN
Buy ("One Buy") Cons Contracts Next Bar at Highest(High, 10) Stop;

IF DayofWeek(Date)=4 AND AboveMA=FALSE
THEN
Sell ("One Sell") Cons Contracts Next Bar at Lowest(Low, 8) Stop;


If MarketPosition = +1 and BarsSinceEntry = daysin then ExitLong ("One Exit-Ln") Next Bar at market;

If MarketPosition = -1 and BarsSinceEntry = daysin then ExitShort ("One Exit-Sh") Next Bar at market;
__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___