Current:   My current system monitors a watchlist and gives me the
appropriate Buy and sell signals in AA as does all systems.  If I own the
stock (I physically initialize the Ticker and Buy Price in the code for 5-7
stock)s and if it triggers some alert condition (Higher CLOSE maybe buy some
more) I set colors, signals, etc to let me know that I must do something.  

 

Example of hard code where symbolm is on a watchlist and I own it - then I
need to pay more attention so I use color

PR1=27.47; NN1 ="EWA"; if (Name()==NN1) {PR=PR1; CondLong = 1; }

 

 

I am thinking of improving this "physically typing in the symbol and buy
price directly into the code" method to a more flexible one.   

 

Possible strategy1:  Use the Account management feature; get buy/short info
from there, convert account file to .csv file and read into my AFL instead
of hard coding.  This is the one I want to use if I can as it would allow me
to use several different portfolios and is all in one place.  Is there a
easy way to read the new account management information and use that
information (buy price, short, date, etc) in AF?.  

 

Possible Strategy2:  Just create a .CSV file using Excel and read into AFL
using FOPEN instead of hard coding.  

 

Possible Strategy 3:  Just use a Study("BP") for the buy price in the chart,
and in the AFL if it triggers some alert condition (Higher maybe buy some
more) I can set colors, signals, etc to let me know that I must do
something.   Very little of my code would need to be changed but would not
account for a long or short condition.   Maybe I can live with this.   Note:
When I mess with the chart the Buy Price line is very sensitive and this can
easily jump and be inaccurate. 

 

Current code for support and resistance in which I could add something for
buy price (BP)

Per20 = (Study("RE",SSID)-Study("SU",SSID))*.20;

AddColumn(C < Study("SU",SSID)+Per20, "Buy Back",1.2,colorBlack, IIf(C <
Study("SU",SSID)+Per20, colorYellow, colorGreen)); //20 % above support
Trigger to buy some more or to sell in a down trend

 

 

How are other people doing this in their code?

 

Just trying to do some planning before I jump into code.  Current method
works ok for now.  

 

Best regards

Dave

Reply via email to