[amibroker] Scale Out bug

2006-04-09 Thread Mike
exits. If anyone sees a problem with they way this is coded, please feel free to point it out. Thanks. - Mike === Buy = Ref(C,-1) 37 AND Open 35; BuyPrice = Open; priceatbuy = 0; Sell = 0; firstProfitTarget = 0; secondProfitTarget = 0

[amibroker] Re: Scale Out bug

2006-04-10 Thread Mike
still unclear on which of the 4 methods is the proper (bugs@, support@, this list, or the FEEDBACK center). Anyway, I appreciate the prompt response. Regards, - Mike --- In amibroker@yahoogroups.com, Tomasz Janeczko [EMAIL PROTECTED] wrote: Hello, Firstly do not send thing in three places

[amibroker] Today's High at opening bar

2006-07-29 Thread Mike
To gather stats, I need to be able to use the daily (EOD) High/Low on any given intraday bar. However, I get the day's High/Low only on the last bar of the day. Can anyone see what I'm doing wrong here ? TIA. //=== TimeFrameSet(inDaily); PrevDay_High = H;

[amibroker] Re: Today's High at opening bar

2006-07-29 Thread Mike
, Tomasz Janeczko amibroker.com - Original Message - From: Mike [EMAIL PROTECTED] To: amibroker@yahoogroups.com Sent: Saturday, July 29, 2006 10:29 PM Subject: [amibroker] Today's High at opening bar To gather stats, I need to be able to use the daily (EOD) High/Low on any given

[amibroker] Not getting RT data feed from IB

2007-02-08 Thread Mike
not display anything (not enough data to display complaint). Can't figure out what happened - something got hosed. Does something need to be done with the InteractiveBrokers plugin for this new upgrade? Any suggestions would be appreciated. Mike

[amibroker] Re: Not getting RT data feed from IB

2007-02-08 Thread Mike
feed off InteractiveBrokers. H Mike --- In amibroker@yahoogroups.com, Tomasz Janeczko [EMAIL PROTECTED] wrote: Hello, No, you don't need to do anything with the plugin as new version comes with newest one (1.6.8). If you don't have data for particular symbol - simply backfill

[amibroker] Interesting market technical indicator

2007-03-23 Thread Mike
he cites a book Evidence-Based Technical Analysis by David Aronson. I am currently reading the book and find it quite facinating. It has started giving me a whole new perspective on technical indicators and their use. Read the reviews on Amazon.com. Mike

[amibroker] QT Projected Volume

2007-09-25 Thread Mike
Quotetracker has the ability to show projected (i.e. estimated final) volume for a bar through throughout the bar. I've been trying to determine how to implement an equivalent in AmiBroker, but I can't find how one would implement this in AFL. Basically, a one would need to determine the % of

[amibroker] Re: I get multiple brokers all the time without any code

2007-10-16 Thread Mike
I have get multiple broker.exe all the time without code. Seems to come when I add an indicator that calls an external database through the sql commands. I reported it twice to tech support but they never got back to me so I just go and check from time to time for the extra broker.exe and

[amibroker] Re: I get multiple brokers all the time without any code

2007-10-16 Thread Mike
that deals with SQL? d -Original Message- From: amibroker@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Sent: Tuesday, October 16, 2007 3:30 PM To: amibroker@yahoogroups.com Subject: [amibroker] Re: I get multiple brokers all the time without any code I

[amibroker] Re: Referring to an array of a specific stock

2007-10-18 Thread Mike
Have a look at the Foreign function in the language reference: http://www.amibroker.com/guide/afl/afl_view.php?id=54 --- In amibroker@yahoogroups.com, mikeleekc [EMAIL PROTECTED] wrote: Hi there, Is there a function that I can refer to a specific stock in my AFL code? Eg. I want to refer

[amibroker] Re: Interactive Brokers

2007-10-20 Thread Mike
We sometimes run our autotrading program w/ their paper account. Works the same as regular account other then your buy/sell does not impact the price (just as it would not impact price manually). --- In amibroker@yahoogroups.com, pstaffieri [EMAIL PROTECTED] wrote: has anyone set up

[amibroker] Re: Modifying the Buy and Short Arrays

2007-10-24 Thread Mike
Hi, If you want to continue down the path you are describing, you can write custom backtester code that iterates through the signals. Check for exit signals, calculate the gain, zero out unreasonable trades. Iterate through the Signals using getFirstSignal/getNextSignal. Use the FindOpenPos

[amibroker] Any backtester support for margin calls?

2007-10-27 Thread Mike
Hi, I see that I can simulate trading a margin account for stocks. I have done a quick experiment to satisfy myself that the trading happens as expected (e.g. 50% margin). But, before I spend any time trying to program it myself, is there any built in support for margin calls, and liquidation

[amibroker] Re: Eind-of-Day Stock Data

2007-11-08 Thread Mike
Hi, I use a paid provider (TeleChart Gold, sometimes referred to as TC2000, TC2005, TC2007 - 29.99/mth $US provided by Worden Brothers http://www.worden.com/SoftwarePricing.aspx ). It has two huge advantages going for it, that in my view have paid for itself many times over: 1) AmiBroker

[amibroker] Re: reg.Ichimoku Chart

2007-11-10 Thread Mike
AmiBroker supports assigning a position score to each signal using the PositionScore array. Just invent a scoring system to represent your categories along the lines of the following: 0 No signal 1 Strong sell 2 Moderate sell 3 Weak sell 4 Weak buy 5 Moderate buy 6 Strong buy Then modify your

[amibroker] Re: ticker list

2007-11-10 Thread Mike
You can refer to the following link for a list of data providers (free and paid) and how to integrate them into AmiBroker (last column of table). You'll have to decide whether you're interested in real time data, or just end of day data. http://www.amibroker.com/guide/h_quotes.html Mike

[amibroker] Re: newbie question... searching the database

2007-11-10 Thread Mike
://www.amibroker.com/guide/afl/afl_view.php?id=7 Mike --- In amibroker@yahoogroups.com, bigitop [EMAIL PROTECTED] wrote: I'm writting a basic system to generate buy/sell signals. The backtester will be set to a 'Date Range' of two weeks and 'All Symbols' from the database, but I would like the script

[amibroker] Re: Passing a variable into the Ref() function

2007-11-10 Thread Mike
of y, and thus be a fair comparrison to passing the scalar -5. http://www.amibroker.com/guide/afl/afl_view.php?id=23 Mike --- In amibroker@yahoogroups.com, chorlton_c_hardy chorlton-c- [EMAIL PROTECTED] wrote: Hello Tomasz, If Ref() accepts variable periods, can you clarify why the code

[amibroker] Re: Passing a variable into the Ref() function

2007-11-10 Thread Mike
Sorry, my bad. I misunderestood your question. I thought you explicitly wanted to pass a scalar, as opposed to any valid variable (which of course an array is). Mike --- In amibroker@yahoogroups.com, Mike [EMAIL PROTECTED] wrote: It would appear that you have misunderstood the return value

[amibroker] Re: How can I automate importing EOD data into Amibroker?

2007-11-20 Thread Mike
I don't think that your provider is on the list. But, AmiBroker has some detailed steps for many vendors located here: http://www.amibroker.com/guide/h_quotes.html Alternatively, you might find the generic ASCII instructions helpful: http://www.amibroker.com/guide/d_ascii.html Mike

[amibroker] Is there a Java - like way to initialize an array of values?

2007-11-21 Thread Mike
Hi, I have several local variable arrays that I need to initialize. Is there an easy way to do this without having to explicitly index each element? For example; in Java I would just do the following: int myValues[] = new int[] {1,1,1,2,2,2}; Thanks in advance.

[amibroker] Re: Is there a Java - like way to initialize an array of values?

2007-11-21 Thread Mike
; % jsMyValues = new Array(1,1,1,2,2,2); jsOtherValues = new Array(2,2,2,1,1,1); AFL(myValues) = jsMyValues; AFL(myOtherValues) = jsOtherValues; % // AFL arrays are initialized from this point on... Thanks, Mike

[amibroker] Re: elitetrader.com

2007-12-12 Thread Mike
Never played w/ metastock. I can tell you that w/o serious workarounds, Tradestation does not backtest portfolios of stocks; only one at a time.Esignal may or may not (not sure) but their programming tools are not nearly as deep. --- In amibroker@yahoogroups.com, Walter Lepore [EMAIL

[amibroker] Re: Ranking Positionscore across all symbols

2007-12-27 Thread Mike
Hi, You may find message 114739 helpful, where I offer a code sample that I believe will help with what you are asking for. My example is based on limit orders, but the approach applies for any strategy. The basic principle is that as you process each symbol at each bar, you do a sorted save

[amibroker] Re: Pyramiding a position at X% price rise

2007-12-27 Thread Mike
Launch the Help Contents from the AmiBroker Help menu. Change to the Search tab and enter scaling. One of the first results will be Portfolio level backtesting. Double click on that and you will see some examples of scaling, including scaling into an existing position once the position rises

[amibroker] Re: Defining a specific Exit Price

2007-12-27 Thread Mike
Hi, A couple of thoughts for you: 1. Why not use the ApplyStop function native to AmiBroker? e.g. applyStop(stopTypeTrailing, ...); http://www.amibroker.com/guide/afl/afl_view.php?applystop 2. You probably want to check if Low Ref(stop, -1), not Close, since a drop at any point in the

[amibroker] Re: Report number of Open Positions for backtest

2008-01-01 Thread Mike
description of your portfolio at each bar, including the number of open positions. Mike --- In amibroker@yahoogroups.com, Graham Johnson [EMAIL PROTECTED] wrote: I've searched the forum without luck. What I would like is to add a column to the backtest report (portfolio) to display the number

[amibroker] Re: Report number of Open Positions for backtest

2008-01-01 Thread Mike
description of your portfolio at each bar, including the number of open positions. Mike --- In amibroker@yahoogroups.com, Graham Johnson [EMAIL PROTECTED] wrote: I've searched the forum without luck. What I would like is to add a column to the backtest report (portfolio) to display the number

[amibroker] Re: Back testing Help

2008-01-02 Thread Mike
Hi, One note, Your entry price would actually have to be the lesser of the Open and 90% of the previous Close, since the Open might be less than your limit order and would thus result in a fill. Also, I'm assuming that you don't want to apply your rule to indexes, only stocks. I don't have

[amibroker] Re: Back testing Help

2008-01-02 Thread Mike
Oops, made a mistake in my editing. Change Buy = Ref(setup, -1) AND Low = (Ref(Close, -1) * .90); BuyPrice = min(Open, myPrice); To read myPrice = (Ref(Close, -1) * .90); Buy = Ref(setup, -1) AND Low = myPrice; BuyPrice = min(Open, myPrice); --- In amibroker@yahoogroups.com, Mike [EMAIL

[amibroker] Re: How do I backtest placing a restricted number of limit orders each night?

2008-01-02 Thread Mike
the same selection criteria to break the tie as would be the order in which AmiBroker processed the signals. I suspect that they will be processed in alphabetical order, but you'll need to verify that. Hope that helps. --- In amibroker@yahoogroups.com, mertema [EMAIL PROTECTED] wrote: Mike, I came

[amibroker] Re: How do I backtest placing a restricted number of limit orders each night?

2008-01-02 Thread Mike
PositionScores). That makes the backtester code a bit more complicated, but the advantage remains; You only have to get it right once, then it can be reused for other conditional entry strategies. Mike --- In amibroker@yahoogroups.com, Mike [EMAIL PROTECTED] wrote: Matt, Tomasz's final reply looked

[amibroker] Re: What after optimization is done ...

2008-01-04 Thread Mike
://www.quantitativetradingsystems.com/book.html Mike --- In amibroker@yahoogroups.com, scourt2000 [EMAIL PROTECTED] wrote: A question that I always had is: after you get your optimized variables, how long are they generally good to use? Do you continually run the optimization on new data coming in like

[amibroker] Re: Foreign-SP500 trend-code question

2008-01-07 Thread Mike
/RestorePriceArrays instead. http://www.amibroker.com/guide/afl/afl_view.php?id=247 Mike --- In amibroker@yahoogroups.com, srengret [EMAIL PROTECTED] wrote: I'm trying to code buy selection criteria that requires the SP500 index (^GSPC) to be higher now than 20 days ago along with a RelStrength

[amibroker] Re: How to show Stops (ApplyStops) in Explore?

2008-01-08 Thread Mike
Hi, If you're using trade delays, then your stops may be being applied against values that you're not expecting. You may need to set exitAtStop = 2 in your ApplyStop call. --- In amibroker@yahoogroups.com, janhausd [EMAIL PROTECTED] wrote: Thanks for the tips wavemechanic! I'm not getting

[amibroker] Re: functions/variable scope errors

2008-01-08 Thread Mike
/global helpful: http://www.amibroker.com/guide/keyword/local.html http://www.amibroker.com/guide/keyword/global.html Mike --- In amibroker@yahoogroups.com, loveyourenemynow [EMAIL PROTECTED] wrote: I am trying to optimize over diffeent types of systems and I need to define function accordingly

[amibroker] Re: Foreign-SP500 trend-code question

2008-01-09 Thread Mike
code sample doesn't show it, but I'm assuming that you rightly intend to use var1 and var2 in your Buy assignment or elsewhere in your code. Mike --- In amibroker@yahoogroups.com, srengret [EMAIL PROTECTED] wrote: To ARA and Mike, Thanks for your suggestions. I think the code does what I

[amibroker] Re: how to trade only top percentile items under multiple criiteria

2008-01-09 Thread Mike
tried out this proposal, so make sure you test everything out if you decide to go with it. Mike --- In amibroker@yahoogroups.com, loveyourenemynow [EMAIL PROTECTED] wrote: Happy 2008 to everyone!! Let's say I want to only trade stocks in the top 50% under 3 different criteria ( volume

[amibroker] auto file synchronizers (was Re: Extremely tired of this.)

2008-01-12 Thread Mike
://en.wikipedia.org/wiki/Lightweight_markup_language Capital letters are pretty universally recognized as shouting, so the above might help soften the tone accross cultures and language barriers. Mike --- In amibroker@yahoogroups.com, Tomasz Janeczko [EMAIL PROTECTED] wrote: Hello, It surprises me to no end

[amibroker] Re: Backtest summary doesn't show all buys and sells as on the price chart

2008-01-18 Thread Mike
You can set the PositionSize variable in your code. For example, if you want all positions to be 100 shares using the Open price, you would write: PositionSize = Open * 100; ...where PositionSize is set to the dollar value for the position (see table):

[amibroker] How to see all optimization rows using IO in Exhaustive mode with servers?

2008-01-27 Thread Mike
Hi, I'm trying to use the distributed computing of Intelligent Optimizer (IO found in files section of this group) to farm out an AmiBroker optimization accross multiple servers. However, I'm only getting a report back on the single best row. I would like to see the complete result set (e.g.

[amibroker] Re: How to see all optimization rows using IO in Exhaustive mode with servers?

2008-01-27 Thread Mike
Message- From: amibroker@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Sent: Sunday, January 27, 2008 6:23 PM To: amibroker@yahoogroups.com Subject: [amibroker] How to see all optimization rows using IO in Exhaustive mode with servers? Hi, I'm trying to use

[amibroker] Re: How to see all optimization rows using IO in Exhaustive mode with servers?

2008-01-27 Thread Mike
mail. To answer your IO question ... The IO Directive you want is ... DetailLog. - Original Message - From: Mike Date: Sunday, January 27, 2008 6:44 pm Subject: [amibroker] Re: How to see all optimization rows using IO in Exhaustive mode with servers? To: amibroker

[amibroker] Re: Automatic Analysis- Are these things possible?

2008-02-03 Thread Mike
You could probably do all of that just by using Optimize. The code will run once for each Optimize iteration and pump the output to the screen at which point you can use the Files button to export as html or csv. If it's just one variable, use that variable as the result of the Optimize. If

[amibroker] Re: Simulation Trading

2008-02-03 Thread Mike
What about signing up for an Interactive Brokers demo account and trading real time from it using the AmiBroker real time plugin for IB? Is that possible? Would it accomplish what you're after? Or do you only get EOD data with that account? --- In amibroker@yahoogroups.com, tedd2pumpkin [EMAIL

[amibroker] Re: forex backtesting

2008-02-06 Thread Mike
By default, the AmiBroker backtester will only allow you to hold one open position per symbol. If you want to allow multiple open positions, then you can use SetBacktestMode( backtestRegularRawMulti ); See reference: http://www.amibroker.com/guide/afl/afl_view.php?id=350 --- In

[amibroker] Re: Locating Industry Ticker Symbol with AmiBroker 5.0 and Telechart Data

2008-02-09 Thread Mike
John, The attachment referred to in your link is no longer available. --- In amibroker@yahoogroups.com, John CW [EMAIL PROTECTED] wrote: --- david.weilmuenster [EMAIL PROTECTED] wrote: Hi, The AmiBroker interface to TeleChart does a good job of importing TeleChart's Industry

[amibroker] Re: Staticvarset...setting last price in a loop

2008-02-20 Thread Mike
, ~Position2 holds the second top ranked value at each bar, etc. http://finance.groups.yahoo.com/group/amibroker/message/114739? threaded=1 Mike --- In amibroker@yahoogroups.com, Joe Landry [EMAIL PROTECTED] wrote: Hugh Check out the AFL function LastValue(array,code); Hope this helps JOE

[amibroker] Re: Simple coding question...

2008-02-26 Thread Mike
) depending on your backtesting mode. If using the default backtester mode, AmiBroker will handle that for you. Alternatively, you could use the Cross function and avoid the duplicate signals, found here: http://www.amibroker.com/guide/afl/afl_view.php?name=cross Mike --- In amibroker

[amibroker] Re: OT; Acer or Toshiba Notebook?

2008-02-26 Thread Mike
Not to confuse you even more, but you might also want to have a look at the 17 HP Pavilion. Price lands right in the middle, has more hard disk space and expands to 4GB memory. My father in law is pretty happy with his, though he had to tweak the color settings (gamma) to his preferences. The

[amibroker] Re: How To Code ...three or fewer bars ago?

2008-02-29 Thread Mike
What about: Buy = ... AND BarsSince(Cross(Close, MA(Close, 15)) = 3; Or would that fail due to comparing an array (BarsSince) to a scaler (3)? If that's the case you could wrap it in a zero offset Ref as: Buy = ... AND Ref(BarsSince(Cross(Close, MA(Close, 15)), 0) = 3; I haven't tested this.

[amibroker] Re: Aronson Detrending Market {Was Detrending... log}

2008-03-01 Thread Mike
assuming that it works. Corrections and enhancements welcomed :) Mike procedure Detrend(compositeName) { local range; range = Status(barinrange); local raw;raw = log(Ref(Open, 2)/Ref(Open, 1)); local total; total = 0; local count; count = 0; local offset; offset = 0; for (i = 0

[amibroker] Re: Aronson Detrending Market {Was Detrending... log}

2008-03-02 Thread Mike
, and this is my interpretation of the book. Do your own research before accepting taking this as acurate. If anyone else has done any work in this area, I would very much like to hear if their approach agrees with my interpretation. Thanks, Mike SetTradeDelays(1, 1, 1, 1);// All trades

[amibroker] Re: Detruding... log

2008-03-02 Thread Mike
are then compared to the market returns. A perfect system would be long for all postive return days and short for all negative return days. At least, that is how I interpretted the book. Mike --- In amibroker@yahoogroups.com, wavemechanic [EMAIL PROTECTED] wrote: How do you intend to use the detrended

[amibroker] Re: Detruding... log

2008-03-02 Thread Mike
, from a gain standpoint. Mike --- In amibroker@yahoogroups.com, Mike [EMAIL PROTECTED] wrote: I cannot comment on the suitability of either approach other than to say that Aronson uses a fixed adjustment accross all bars in the period under evaluation. The value of which was calculated from

[amibroker] Re: Aronson Detrending Market {Was Detrending... log}

2008-03-03 Thread Mike
strategy's predictive ability. A t-test will tell you if the difference is more than just chance. Mike --- In amibroker@yahoogroups.com, Louis Préfontaine [EMAIL PROTECTED] wrote: Hi Mike, I attached an image of what I got. I suspect that the green/red arrows may be the buying/selling signals

[amibroker] Re: Aronson Detrending Market {Was Detrending... log}

2008-03-03 Thread Mike
. --- In amibroker@yahoogroups.com, Louis Préfontaine [EMAIL PROTECTED] wrote: Hi Mike, That's sad you can't see the images. I am sure you would understand my questions. Ok, here is what I did step-by-step: 1) I used the detrend' script with YHOO for 1998 to 2000. The ~YHOO file was created

[amibroker] Spam site stealing posts from this forum

2008-03-03 Thread Mike
Doing a google search on Aronson came up with a spam site posing as a blog and publishing the posts from this forum as original content. Presumably to catch unsuspecting surfers and make some money from ads. http://jakarta-bangkok.blogspot.com/2008/03/re-amibroker-re-aronson-

[amibroker] Re: Spam site stealing posts from this forum

2008-03-03 Thread Mike
] On Behalf Of Mike Sent: Tuesday, 4 March 2008 12:14 PM To: amibroker@yahoogroups.com Subject: [amibroker] Spam site stealing posts from this forum Doing a google search on Aronson came up with a spam site posing as a blog and publishing the posts from this forum as original content

[amibroker] Re: Artificial ticker

2008-03-05 Thread Mike
and backtesting as needed. Mike --- In amibroker@yahoogroups.com, Thomas Ludwig [EMAIL PROTECTED] wrote: Hello, I want to create an artificial ticker from two existing tickers. If I do it this way: O1=Foreign(846900,o); H1=IIf(IsEmpty(Foreign(A0C4CA,h)),Foreign(846900,h),Max (Foreign(846900,h

[amibroker] Re: IFF and None for coloe conditions.

2008-03-05 Thread Mike
none of these really just amounts to same as background doesn't it? What about using whatever your background chart color is: e.g. colorWhite. --- In amibroker@yahoogroups.com, Mohammed [EMAIL PROTECTED] wrote: Hi All, Is it passable to use color with three conditions one of them none

[amibroker] Re: Artificial ticker

2008-03-06 Thread Mike
(...); AddToComposite(...); AddToComposite(...); AddToComposite(...); StaticVarSet(ATCFlag, 1); } I've never used statics, so double check the syntax above, and test what happens when the variable is Null. Mike --- In amibroker@yahoogroups.com, Thomas Ludwig [EMAIL PROTECTED] wrote: Mike, thanks

[amibroker] Re: Artificial ticker

2008-03-06 Thread Mike
Have a look at the user guide for AddToComposite. It covers this type of operation. http://www.amibroker.com/guide/a_addtocomposite.html Also, Hermen's guide, which goes into much more detail. http://www.amibroker.net/3rdparty/IntroToAtc.pdf Mike --- In amibroker@yahoogroups.com, Louis

[amibroker] Re: Sell trigger

2008-03-06 Thread Mike
Applying Steve's answer generically, such that you can test different periods, you can use the Sum function http://www.amibroker.com/guide/afl/afl_view.php?name=sum periods = Optimize(Periods, 2, 2, 5, 1); Sell = Sum(Close Ref(Close, -1), periods) == periods; --- In

[amibroker] Re: trading rule checking another index?

2008-03-06 Thread Mike
Have a look at SetForeign/RestorePriceArrays http://www.amibroker.com/guide/afl/afl_view.php?id=247 SetForeign(some other symbol name); Buy = Cross(Close, MA(Close, 30)); Sell = ...; RestorePriceArrays(); The Buy and Sell will apply to the active symbol (e.g. Apple), but the O/H/L/C will be

[amibroker] Re: What is best statistic for straightness of equity curve?

2008-03-11 Thread Mike
K-Ratio is often mentioned for this purpose. http://trader.online.pl/TST/shape_ratio_k-ratio_rina_index.htm Mike --- In amibroker@yahoogroups.com, Dennis Brown [EMAIL PROTECTED] wrote: Hello, I have my system for intraday trading complete enough that I need to start selecting goodness

[amibroker] Re: Statistical tests as custom metrics

2008-03-12 Thread Mike
that same symbol. Then perform t-test as above using the two output columns as the variable ranges. Note that the values are logarithms of the percent daily change, so don't try interpreting them as price values. Mike --- In amibroker@yahoogroups.com, Thomas Ludwig [EMAIL PROTECTED] wrote

[amibroker] Re: Color Formula Help Please.

2008-03-12 Thread Mike
ParamColor is expecting a scaler value, but you are passing kColor which has been initialized to an array (i.e. IIF returns an array). Mike --- In amibroker@yahoogroups.com, Mohammed [EMAIL PROTECTED] wrote: Hi, why I get error in this formula: insidebar = H = Ref( H, -1 ) AND L = Ref( L

[amibroker] Re: Color Formula Help Please.

2008-03-12 Thread Mike
something like this: insidebar = H = Ref( H, -1 ) AND L = Ref( L, -1 ); Plot( C, Close, IIF( insidebar, ParamColor( Inside Bar, colorBlue ), colorLightGrey ), styleNoTitle | GetPriceStyle() ); --- In amibroker@yahoogroups.com, Mohammed [EMAIL PROTECTED] wrote: Hi Mike, would you please help

[amibroker] Re: tracking the trades

2008-03-13 Thread Mike
I can't find a link for it online. So, from AmiBroker do the following: Help menu Search Type in account manager in search bar. Select first entry in the list (i.e. Using Account Manager). Available as of version 5.0 I believe. For version 4.9 search for Portfolio Window Mike

[amibroker] Re: How to reference the price at a sigscaleout event

2008-03-13 Thread Mike
There are undoubtedly more elegant ways to do it depending on the organization of your code. But, if all else fails, you could always just iterate backwards through the bars to find what you're looking for: for (i = BarCount - 1; i = 0; i--) { if (Buy[i] == sigScaleOut) {

[amibroker] Re: forex backtesting

2008-03-14 Thread Mike
Hi, I had hoped that someone else would chime in for you here, since I don't trade futures, and don't use stops. But, since nobody else has answered, the best I can do is refer you to the documentation: http://www.amibroker.com/guide/afl/afl_view.php?name=ApplyStop Mike --- In amibroker

[amibroker] Re: Custom Metric for Walk Forward Optimization

2008-03-21 Thread Mike
just be removed, since you've already calculated your new value and all you need to do is set it as a custom metric: NewKRatio = st.getvalue(NewKRatio); Mike --- In amibroker@yahoogroups.com, David Fitch [EMAIL PROTECTED] wrote: I am trying to make a custom metric for walk forward

[amibroker] Re: to stop the run of the code

2008-03-23 Thread Mike
) { continue; } _TRACE(i == + i); if (i == 8) { break; } } For more information, run AmiBroker, click Help menu, click on Index tab and type in break. Do the same for continue. Mike --- In amibroker@yahoogroups.com, reinsley [EMAIL PROTECTED] wrote: Thank you Ed for your help

[amibroker] Re: Number of Open Positions

2008-03-24 Thread Mike
: http://www.amibroker.com/guide/w_settings.html Mike --- In amibroker@yahoogroups.com, Graham Johnson [EMAIL PROTECTED] wrote: There are 2 things that I would like to achieve 1. Backtest Report - maximum no. of open positions for the backtest. 2. Equity Chart - number of open positions

[amibroker] Re: Number of Open Positions

2008-03-25 Thread Mike
(); bo.addCustomMetric(Max Count, largestCount); AddToComposite(counts, ~MaxCount, X, atcFlagDefaults | atcFlagEnableInBacktest | atcFlagEnableInPortfolio); } Buy = Cross(MA(Close, 30), MA(Close, 100)); Sell = Cross(MA(Close, 100), MA(Close, 30)); Short = Sell; Cover = Buy; Mike

[amibroker] Re: Assigning default parameters in User-Defined Functions??

2008-03-25 Thread Mike
Hi, This may be a shot in the dark. But, what about writing some javascript? The following link might prove helpful. http://parentnode.org/javascript/default-arguments-in-javascript- functions/ Mike --- In amibroker@yahoogroups.com, Dennis Brown [EMAIL PROTECTED] wrote: What are you trying

[amibroker] Re: Something is different. But what ?

2008-03-27 Thread Mike
You could probably leverage the Flip function to make this easier on yourself. e.g. Buy = ... Sell = ... InLongPos = Flip(ExRem(Buy, Sell)) * 1000; Mike --- In amibroker@yahoogroups.com, wavemechanic [EMAIL PROTECTED] wrote: The iif() does not give the same result because ref(inlongpos, -1

[amibroker] Re: Something is different. But what ?

2008-03-27 Thread Mike
Sorry, That should probably read Flip(ExRem(Buy, Sell), Sell) * 1000; And maybe not much easier after all ;) Mike --- In amibroker@yahoogroups.com, Mike [EMAIL PROTECTED] wrote: You could probably leverage the Flip function to make this easier on yourself. e.g. Buy = ... Sell

[amibroker] Re: Rotational trading - not wanting buy when all trades are bad...

2008-03-27 Thread Mike
/afl_view.php? name=enablerotationaltrading Mike --- In amibroker@yahoogroups.com, gmorlosky [EMAIL PROTECTED] wrote: How can I do rotational trading, but not be in when the trades are the best of worst trades I won't trade. I beleive with EnableRotationalTrading and WorstHeldRank I'll be forced

[amibroker] Re: Something is different. But what ?

2008-03-28 Thread Mike
) being undefined. Temp[1] is 1000 due to Buy[1] being 1. Temp[2] is 0 due to Ref(InLongPos, -1) being 0. Temp[3] is 0 due to Sell being 1. InLongPos = Temp; Would that explain what you are seeing? Mike --- In amibroker@yahoogroups.com, wavemechanic [EMAIL PROTECTED] wrote: So what if that's

[amibroker] Re: Something is different. But what ?

2008-03-28 Thread Mike
--- In amibroker@yahoogroups.com, wavemechanic [EMAIL PROTECTED] wrote: Mike: ...Of course Buy (and Sell) is an array (who said it wasn't) I thought that you did ;) ...ask yourself if you did or did not generate Buy with a function that returns an array? If you conclude that Buy

[amibroker] Re: Walk-Forward Optimization - worst in-sample params' OOS results

2008-03-31 Thread Mike
). Then set your custom metric as the optimization target of the walk forward in the walk forward settings tab of the AA window. For example make a custom metric calculated as KRatio * -1. http://www.amibroker.com/guide/a_custommetrics.html Mike --- In amibroker@yahoogroups.com, john_dxd_smith

[amibroker] How do I get current bar index as a scaler?

2008-03-31 Thread Mike
Does anyone have an easy way to get the current bar index as a scaler? I find that I often want to dereference an array to get a scaler, but don't know of an easy way (aside from looping) to get the current bar index. For example; How would I figure out 'x' in the snippet below without

[amibroker] Re: How do I get current bar index as a scaler?

2008-04-01 Thread Mike
could write MyScaler = MyArray[getCurrentBarIndex()]; Thanks, Mike

[amibroker] Re: How do I get current bar index as a scaler?

2008-04-01 Thread Mike
Thanks for all the replies. You have confirmed what I expected. I'm already doing looping. I was just hoping someone might have a neat little trick, so as to keep the code easier to maintain. No problem. I'll keep the looping. Mike --- In amibroker@yahoogroups.com, gp_sydney [EMAIL PROTECTED

[amibroker] Re: Help with code

2008-04-01 Thread Mike
If Buy has not yet been set, you will need to break out the signal from the asignment. Also check for 29 rather than 29. Signal = ... buy logic ... Buy = Signal AND BarsSince(Ref(Signal, -1)) = 30; // At least 30 ago Mike --- In amibroker@yahoogroups.com, Phsst [EMAIL PROTECTED] wrote

[amibroker] Re: RSI Contrarian System

2008-04-06 Thread Mike
Open. Mike --- In amibroker@yahoogroups.com, Robert Lu [EMAIL PROTECTED] wrote: Hello, Can anyone advise how to write a system under the following rules? Buy next day Open if RSI(14) crosses above 60 and close Ref (Close, -3) After buy, sell anytime if RSI(14) drops below 60 or wait for 5

[amibroker] Re: Bollinger Band with variable period in AFL

2008-04-11 Thread Mike
= ... // dynamic calculation top = BBandTop( Close, period, 2); myarray[i] = top[i]; } It's quite slow. But, I believe that it will do what you want. Mike --- In amibroker@yahoogroups.com, Ton Sieverding [EMAIL PROTECTED] wrote: That I understand Bill. And to get the adaptive MA is the easy

[amibroker] Re: How can I create buy/sell signal on two symbols simultaneously?

2008-04-11 Thread Mike
the include statement to include it in the second script. Hope that helps. Mike --- In amibroker@yahoogroups.com, markhoff [EMAIL PROTECTED] wrote: I would like to mention one point which might be essential to find a solution: The 2nd symbol is always the same independent on the 1st symbol, means

[amibroker] Re: Another tough question...

2008-04-13 Thread Mike
of prior and later IS periods when calculating most of the OOS periods? Thanks. --- In amibroker@yahoogroups.com, Mike [EMAIL PROTECTED] wrote: Howard, I agree that reoptimization is valid, necessary even, at any time after going live. Specifically; Any time measured performance values

[amibroker] Re: Exrempsan question

2008-04-13 Thread Mike
[EMAIL PROTECTED] wrote: Thanks Mike! This look very easy but it seems like it will work! Louis Louis 2008/4/9, Mike [EMAIL PROTECTED]: Assuming that your Buy logic is a crossing type signal as provided in your example (i.e. Cross(MA...)). You could probably just introduce

[amibroker] Re: Explanation and thresholds of BackTest terms

2008-04-14 Thread Mike
Louis, See message #122637 where it is mentioned that the formula has since changed. According to that post, the creator suggests a measure of 0.5 or better. Others within this forum have advocated that a value of 0.15 or more is pretty good. Mike --- In amibroker@yahoogroups.com

[amibroker] Re: How do I get the value of one of the optimized columns?

2008-04-15 Thread Mike
/MDD: + carMDD + \n, fh); fclose(fh); } } Buy = DayOfWeek() == trigger; Sell = DayOfWeek() == 5; Refer to the links provided in my earlier response for more detail. Mike --- In amibroker@yahoogroups.com, loveyourenemynow [EMAIL PROTECTED] wrote: Hi Mike, Are you sure

[amibroker] Re: How do I get the value of one of the optimized columns?

2008-04-15 Thread Mike
(); Mike --- In amibroker@yahoogroups.com, Mike [EMAIL PROTECTED] wrote: Ly, You can get any of the included metrics after running a backtest. An optimization is just a collection of backtests. So, your code will be executed for each backtest in the optimization. Copy the following

[amibroker] Re: Difference betwee OOS and IS

2008-04-18 Thread Mike
to determine what the ideal IS period length is for your strategy. If you are unable to find a suitable IS:OOS period lengths combination, that suggests that your strategy is poor and needs to be reworked or abandoned. Mike --- In amibroker@yahoogroups.com, Louis Préfontaine [EMAIL PROTECTED

[amibroker] Re: Difference betwee OOS and IS

2008-04-18 Thread Mike
/userkb/?s=intelligent+optimizer Mike --- In amibroker@yahoogroups.com, Louis Préfontaine [EMAIL PROTECTED] wrote: Hi Mike (and everyone), The problem I have with actual walk-forward is this: each parameters are tested only once. As an example, if I choose a Cross ma (c,20), ma (c,50

--To Mike -- Re: [amibroker] Re: Aronson Detrending Market {Was Detrending...

2008-04-20 Thread Mike
. For any range, the mean of the adjusted values produced by your formula will not be zero and thus is not what Aronson was doing. However, what you have produced may prove to be a handy indicator. Thanks for the contribution. Mike --- In amibroker@yahoogroups.com, thomasdrewyallop [EMAIL

[amibroker] Re: Buy stop and sell stop instead of backtester setting options.

2008-04-20 Thread Mike
SetTradeDelays(0, 0, 0, 0); Buy = High Ref(High, -1); BuyPrice = Ref(High, -1); --- In amibroker@yahoogroups.com, alta hob [EMAIL PROTECTED] wrote: Hi I am using the backtester in AB and when a trade is triggered the backtester setting option is being used which is currently set at

  1   2   3   4   5   6   7   8   9   10   >