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

[amibroker] Scaling issue



PureBytes Links

Trading Reference Links

Hi all,
          i'm trying to learn to add to positions in a system that i've i've 
already backtested and i'm happy with,,,i've read through the help section 
and now trying to stick a few peices of the puzzle together,,

my initial system is this,,,
Longsetup=xyz;
buy=ref(longsetup,-1);
buyprice=open;
positionsize=10000;
settradedelays=(0,0,0,0);
sell=cross of ma(xyz);


my idea was to add another position on the second day if that day is an up 
day and happy to use the closing price as i'm watching it close myself,,,

here's what i tried after reading the help file,,,,clearly i'm lost as it's 
not working at all not even the firstpurchase
and i'm unsure how to instruct the second purchase to buy the close,,,
any scaling advice please
regards

Paul

fixeddollaramount=10000;

firstpurchase=Cum(Ref(Longsetup,-1)==1);

Secondpurchase=Cum(C>O)==1;

Buy=IIf(firstpurchase,1,IIf(Secondpurchase,sigScaleIn,0));

PositionSize=fixeddollaramount;

BuyPrice =Open;






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

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/