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

[amibroker] Re: Swing Trade Scan



PureBytes Links

Trading Reference Links

Alan,

Try using "Study" function. This allows you to draw a trendline manually and
automatically detect trendline break.

You would put all stocks of tinterest in a watchlist, mark your criteria and
run e screen

Look at "STUDY" in help section


----- Original Message ----- 
From: "firehorse888uk" <firehorse888uk@xxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, July 11, 2004 7:31 AM
Subject: [amibroker] Help with syntax required to get program started wanted
:-)


> Hi,
>
> I know what I want to do but AFL is so extensive that I just don't
> know where to start!
>
> I have a list of stocks I want to monitor at certain end of day prices.
>
> At the moment I have found the alertif to tell me when the price of a
> stock reaches an interesting level, when I then have to manually check
> a lot of other calculations.
>
> For example, So I've got the following code.
>
> -----------------------
> Buy=False;
> Sell=False;
> AlertIf(Name()=="AA"  AND(L<30.56*1.02),"",NumToStr(L)+" Buy
> 30.56",1,1+2);
> AlertIf(Name()=="GM"  AND(H>47.30*0.98),"",NumToStr(H)+" Sell
> 47.3",1,1+2);
> -----------------------
>
> I'm trying to monitor about 140 stocks in a spreadsheet and have to
> manually transfer the numbers into the program. I would like to
> simplify the procedure! First step is how to put to process the array
> so ...
>
> how do I turn the above into a procedure like the following
>
> -----------------------
> CheckArray[1,1]="AA";
> CheckArray[1,2]="Buy";
> CheckArray[1,3]=30.56;
>
> CheckArray[2,1]="GM";
> CheckArray[2,2]="Sell";
> CheckArray[2,3]=47.3;
>
> for stocks = 1 to 2
> IsInteresting( CheckArray[stocks, 1],CheckArray[stocks,
> 2],CheckArray[stocks, 3] )
> next
>
> function IsInteresting( Stock, BuySell, Price);
>
> If BuySell = "Buy"
> If L < Price*1.02
> Write( Stock + "Buy at" + Price + " - Currently at " + C )
> endif
> else
> If H > Price*0.98
> Write( Stock + "Sell at" + Price + " - Currently at " + C )
> endif
> endif
> end
> -----------------------
> Next step is how to import an Excel / ascii CSV file into an array.
> Ideas for that would also be appreciated.
>
> I'm not even sure if I've got it in the right place as it looks like
> you can also write code in the commentary as I found from my last
> question!
>
> I'm sure it's simple but I just get a headache trying to figure out
> where to start!
>
> Many thanks
> --
> Alan
>
>
>
>
> Check AmiBroker web page at:
> http://www.amibroker.com/
>
> Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> Yahoo! Groups Links
>
>
>
>
>




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

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

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