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

[amibroker] Re: How can you duplicate AA settings.



PureBytes Links

Trading Reference Links

Tom,

I don't have any experience trading futures, so cannot give a 
competent answer to your question.

However, if your PositionSize is 1 and the value of Volume is 3, then 
using Buy = ...AND PositionSize < .1 * Volume in your code would 
prevent that trade since 1 > 0.3.

Similarly, changing the code to PositionSize > Volume = 0 is 
meaningless since you are saying PositionSize > 0 (i.e. your code is 
first setting Volume to zero then checking if PositionSize is greater 
than that result).

Mike

--- In amibroker@xxxxxxxxxxxxxxx, "professor77747" <professor@xxx> 
wrote:
>
> In the AA porfolio tab, I have Max Open Position set at 1
> I have Limit Trade size % at 10 and I have the disable trade size 
> limit when bar is at zero checked. 
> 
> I added AND PositionSize < Volume * 0.10; to my buy statement. The 
> reults changed dramatically. I only had 8 trades instead of 45. 
> 
> I am trading 1 future contract. Would this make a difference? I have 
> checked the missing trades and the volume was 3 contracts on one, 
> zero on another, 19 on the third, and zero on a fourth. This doesn't 
> make sense to me.
> 
> Also, if I change the
>  
> AND PositionSize < Volume * 0.10;
> to 
> AND PositionSize > Volume = 0;
> 
> I get results that are that are the same as I get without adding any 
> of this. However, the trades are still missing.
> 
> Tom
> 
> 
> 
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "professor77747" <professor@> 
> wrote:
> >
> > Thanks Mike,
> > 
> > I will try your suggestion. I already have it set in the AA 
> settings. 
> > I just want to duplicate the backtesting trades using my formula 
so 
> I 
> > want to add it to my formula.
> > 
> > I am automatic trading and I check my actual trades with the 
> backtest 
> > trades after they are placed. I noticed that a few trades were 
made 
> > that were not made on the backtest list.
> > 
> > Tom
> > 
> > Tom
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, "Mike" <sfclimbers@> wrote:
> > >
> > > The setting you describe can be found on the Portfolio tab of 
the 
> > AA 
> > > window as described here: 
> > > http://www.amibroker.com/guide/w_settings.html
> > > 
> > > If you want to accomplish the same thing programatically, just 
> add 
> > > the condition as part of your buy logic.
> > > 
> > > e.g. Assuming that you've got PositionSize set as a number of 
> shares
> > > 
> > > Buy = ... AND PositionSize < Volume * 0.10;
> > > 
> > > If you have PositionSize set as a percentage of equity, you 
would 
> > > need to move the check into custom backtest code to multiply the 
> > > percentage by the Equity property of the backtester object.
> > > 
> > > But, of course, it's easiest to just set the value in the AA 
> > window :)
> > > 
> > > For consistency, you may want to set all your settings just the 
> way 
> > > you like, then save them to an external .abs file. That way you 
> can 
> > > mess around with other settings with the comfort of knowing that 
> > you 
> > > can always reload the known good values before doing a "real" 
> run. 
> > > 
> > > Mike
> > > 
> > > --- In amibroker@xxxxxxxxxxxxxxx, "professor77747" <professor@> 
> > > wrote:
> > > >
> > > > I have a formula that I backtested. I found that some trades 
> were 
> > > not 
> > > > made when the conditions were satisfied. Then I was told that 
> the 
> > > > settings in AA were the problem. 
> > > > 
> > > > I was told that by default AmiBroker won't open new trades 
when 
> > > desired 
> > > > trade size is less than 10% of bar volume. I searched help for 
> > > volume 
> > > > and bar volume, but I didn't find anything that I thought 
would 
> > > help me 
> > > > add that condition to my formula.
> > > > 
> > > > 
> > > > How can I duplicate that condition?
> > > > 
> > > > Thanks,
> > > > Tom
> > > >
> > >
> >
>


------------------------------------

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
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/