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

[amibroker] Re: How do I reference back to my current trade buy price?



PureBytes Links

Trading Reference Links

In response to a number of questions concerning entryprice, when entered, how to reference back to my current tarde price, etc. I have found it necessary (as have many other senior people in the AFL community) to make a loop which handles the "BUY" or "SHORT" situation explicitly. That is, in order to answer many complicated questions you just have to have a loop which goes from 1 to LastValue(BarIndex()), and evaluates each trade on a one by one basis. 
I am not saying that this invalidates the "array processing" approach of amibroker, but it does minimize its use.
You may need a loop to answer such questions as:
1. number of shares purchased for each signal.
2. Am I in a long or short trade
3. What is my stop price for this trade? (profit, loss, etc.)
4. How many bars am I into this trade?
5. Current potential profit/loss on this trade
6. etc.
This kind of loop is just like TradeStation easyLanguage, if you are familiar with that.
If you need some help with the basic structure of this type of loop, there are many examples in this group.



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

**** 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/