[amibroker] Re: Twiggs Momentum Indicator

2010-09-02 Thread j0etr4der
Hi, There are 3 Twiggs Money Flow indicators in the Library. http://www.amibroker.com/members/library/detail.php?id=925 http://www.amibroker.com/members/library/detail.php?id=614 http://www.amibroker.com/members/library/detail.php?id=1132 (weekly) --- In amibroker@yahoogroups.com,

[amibroker] Re: SIMPLE APPLYSTOP QUESTION

2010-08-27 Thread j0etr4der
Hi, You need to read the Applystop entry in Help/UG. See Scenario 3. ApplyStop( stopTypeProfit, stopModePercent, 5, 2, 0 ); BR, Joe --- In amibroker@yahoogroups.com, bistrader bistra...@... wrote: Want to exit at NEXT day close when get to 5%. So, if get to 5% today, then would exit

[amibroker] Re: A gift and a challenge

2010-08-06 Thread j0etr4der
Hi Dennis, I know I must be missing something blatantly obvious, but don't know what. When I copy/paste your functions to a new Editor session and run Backtest I get the following error: Error 29. Variable 'g_firstbar' used without having been initialized. If I initialize the globals outside

[amibroker] Re: Z score measurement

2010-07-20 Thread j0etr4der
Hi, This entry in the Library may be of use: http://www.amibroker.com/members/library/detail.php?id=1255 Joe --- In amibroker@yahoogroups.com, mikk12345 mikk12...@... wrote: Hi how would i go about calculated the z score of a trading system. I would like to find the confidnce level so i

[amibroker] Re: Random Backtesting

2010-07-15 Thread j0etr4der
Howard, the documentation states, The score (PositionScore) for all securities is calculated first. Then all scores are sorted according to absolute value of PositionScore. Then top N are choosen to be traded. Has that changed? Joe --- In amibroker@yahoogroups.com, Howard B howardba...@...

[amibroker] Re: check application mode?

2010-07-15 Thread j0etr4der
Hi, Read the Help on, STATUS - get run-time AFL status information Joe --- In amibroker@yahoogroups.com, chuck_win ch...@... wrote: Is it possible to check by code if the running application is backtest, or optimize? Thanks. Charles

[amibroker] Re: AFL - buys at bar low even when my buyprice is not hit

2010-06-30 Thread j0etr4der
Buy does not depend on the BuyPrice. If Buy is True and the BuyPrice you set is below the Low, then AB sets the BuyPrice at the Low. See PriceBoundChecking in Help. Assuming you are sending a limit buy at the BuyPrice to your broker for a trade tomorrow: . . . BuyPrice = Close - ATR(10) *

[amibroker] Re: Different Applystops for long and short positions possible?

2010-05-31 Thread j0etr4der
Hello, This illustrates my point. Equity for the current back tester is only available through Custom Backtest Interface. I don't think is should be necessary to be an object oriented programmer to access something as fundamental as Equity. [Or that ApplyStops don't update the Sell/Cover

[amibroker] Re: Different Applystops for long and short positions possible?

2010-05-30 Thread j0etr4der
Hello Markus (and the others who replied), You need to review the Comments for the ApplyStop and Equity Help topics to understand the dilemma you find yourself in. First, the Sell/Cover arrays are not filled by ApplyStop. You need to use Equity(1): For visual conformation of ApplyStop

[amibroker] Re: Dummy variable walk-forward not matching backtest

2010-05-14 Thread j0etr4der
From the Help section titled, Walk-forward testing and optimization IN-SAMPLE and OUT-OF-SAMPLE combined equity Combined in-sample and out-sample equities are available by ~~~ISEQUITY and ~~~OSEQUITY composite tickers (consecutive periods of IS and OOS are concatenated and scaled to maintain

[amibroker] Re: can somebody help with afl code for head shoulders pattern detection

2010-04-24 Thread j0etr4der
http://www.amibroker.com/members/library/detail.php?id=166 http://www.amibroker.com/members/library/detail.php?id=884 You need to be signed in to Amibroker.com. There is a lot of AB code on the net. http://www.google.com/search?hl=enq=head+shoulders+afl+-football --- In

[amibroker] Re: Ref function and backtesting

2010-03-31 Thread j0etr4der
It depends on what your trade delays are and your data source. If it is 0 and End of Day (EOD) data, then the answers are yes. Try this to make it more clear. SetTradeDelays( 0, 0, 0, 0 ); BuySignal = High HHV( High, 50 ) AND EMA( Volume * Close, 20 ) 10; Buy = Ref(

[amibroker] Re: Why writeif returns the same value all the time?

2010-03-13 Thread j0etr4der
I tried on a watchlist with 60 stocks. There were both Trend UP and Trend Downs, BUT for any one stock, the results were the same (either all Up or all down Down.) Something else is wrong other than WriteIf. Good luck. --- In amibroker@yahoogroups.com, googool123123 bfall...@... wrote:

[amibroker] Re: Help with PositionScore

2010-03-10 Thread j0etr4der
PositionScore uses the current bar by default. Which is looking forward. So... PositionScore = Ref( ROC( Close, 40 ), - 1 ); You can confirm this for yourself by looking at the individual trades using the Detail Log report. Don't think this answers your question, but using the Detail Log

[amibroker] Re: Saving on optimization time

2010-02-09 Thread j0etr4der
Hi, Assuming that the width of the range in more significant than the resolution, you might try something like this: heat = optimize( heat, 5, 1, 10, 1 ); fast = optimize( fast, 25, 1, 50, 1 ) * 2; slow = optimize( slow, 50, 25, 75, 1 ) * 2; 25,000 vs 100,000 combinations. I've had good

[amibroker] Re: error #5 Argument #1 has incorrect type ..anyway around this?

2010-01-28 Thread j0etr4der
I cannot help you with a solution, but can tell you there are only a limited number of functions that can accept an array as an argument. You might be able to do this in loop. Good luck. From the User's Guide somewhere: The following functions support variable periods (where periods parameter

Réf. : Re: [amibroker] MULTIPLE BUY and SELL

2010-01-19 Thread j0etr4der
Bonjour, You may have missed these two replies: http://finance.groups.yahoo.com/group/amibroker/message/146093 http://finance.groups.yahoo.com/group/amibroker/message/146102 Bon chance! --- In amibroker@yahoogroups.com, Yves ylt...@... wrote: I'm try that, and I'm have always the same

[amibroker] Re: MULTIPLE BUY and SELL

2010-01-17 Thread j0etr4der
Another way to do that is to segregate all of your plotting so that it is not executed during backtesting. This has the additional advantage speeding up backtesting. if ( Status( action ) == actionIndicator ) { buy = exrem( buy, sell ); //...or... Equity( 1, 0 );\\ ...which also makes

[amibroker] Re: Is there a faster way of writing this AFL?

2009-12-04 Thread j0etr4der
If you mean backtest or optimization speed then this could help... if ( Status( action ) == actionIndicator ) { Plot(Foreign(, Close)/Foreign(XYZ, Close), /ZYX Ratio, colorGreen); //all of your plots, plotshapes and calculations specific to plotting... . . . } --- In

[amibroker] Re: Trying to access backtester stats

2009-10-28 Thread j0etr4der
); --- In amibroker@yahoogroups.com, j0etr4der j0etr4der@ wrote: Hello, In the User's Guide Backtester Interface section, Stat object is says, Metrics are usually calculated once backtest is completed but it is also possible to calculate metrics during backtest. To calculate current metrics

[amibroker] Trying to access backtester stats

2009-10-27 Thread j0etr4der
Hello, In the User's Guide Backtester Interface section, Stat object is says, Metrics are usually calculated once backtest is completed but it is also possible to calculate metrics during backtest. To calculate current metrics and get the access to them simply call GetPerformanceStats method