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

[amibroker] Scale IN OUT



PureBytes Links

Trading Reference Links

Hi,

I have an indicator PCQ that has levels of -100, -75, -50, -25, 0 , 25, 50, 75 100. I want to use the indicator to scale in and out of a single stock. 
I want to Buy when PCQ goes positive with the  % of equity equal to the value of PCQ. So, if PCQ goes from -50 to +25, I want to cover my short at -50%  and then go long 25%.
Basically, I want to scale in or out of the position when PCQ changes levels, and have a % investment long or short equal to the PCQ level. So, if PCQ goes from +25 to +75, I want to scale from 25% long to 75% long.
I have tried to use setpositionsize and sigscaleIn and sigscaleOut in buy and sell rules, but I clearly don't understand how to do this. I have wasted several days on this.
Can this be done with arrays or do I need to loop? I could not find any examples.
Any suggestions on how to do this would be much appreciated.

Regards,
Dan Allen



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

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

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

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/