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

Re: [amibroker] Stopping repeat buy/sell orders



PureBytes Links

Trading Reference Links

Hello Graham,
 
I am totally new in the world of Techincal Analysis. The AFL that you have showed below, where do I put it in the AFL given by ChrisB? Please advice.
 
Thanks
Amirul
 
 
----- Original Message -----
From: Graham
Sent: Saturday, June 07, 2008 5:05 AM
Subject: Re: [amibroker] Stopping repeat buy/sell orders

Your Buy statement is not a set of conditions, it is actually a price
Assuming you want the entry to be based on the price of Open on
Monday, here is example of how you can do it

dw = dayofweek();
Monday = dw<ref(dw,-1); // in case Monday does not exist use next day
Buy = cross( H, valuewhen( Monday, LondonOpen + FiftyPips) );
BuyPrice = LondonOpen + FiftyPips;

--
Cheers
Graham Kav
AFL Writing Service
http://www.aflwriting.com

2008/6/7 alta hob <altahob@xxxxxxxxxxxcom>:
> Hi all
>
>
> How does one stop repeat buy sell orders in AB? I want to trigger only one
> trade per week but the script is generating multiple orders.
>
> thanks
>
>
> // London Opening time and Open Value
> LondonStart = Param("London Start", 070000, 060000, 130000, 010000);
> LondonOpen = deValueWhenTime( Open, LondonStart);
>
> fridayclose = ValueWhen(DayOfWeek () == 5, Close);
>
>
>
> FiftyPips = 50 * 0.50;
> entrylevel = LondonOpen + FiftyPips;
>
> Buy = LondonOpen + FiftyPips;
> ApplyStop( stopTypeLoss, stopModePoint, amount= 50, exitatstop= 1, volatile
> = False, ReEntryDelay = 0 );
> Sell = fridayclose;
>
>
> Buy = ExRem(Buy, Sell);
> // Sell = ExRem(Sell, Buy);
>
>
> // Plot these to see if they are correct
> Plot(Close, "", colorBlack, 64);
> //Plot(LondonStart, "LS", colorBlue);
> Plot( IIf(TimeNum() == LondonStart,LondonStart, -1e10),"L S",
> colorBlue,styleHistogram | styleNoLabel | styleNoTitle |
> styleOwnScale,-0.05, 1);
>
> Plot(LondonOpen, " London Open", colorBlue, 1);
>
> Plot(entrylevel,"entry level",colorRed, 1);
>
> // Check outputs with View ..Interpretation window...
>
> printf("LondonOpen=" + WriteVal(LondonOpen,8.4));
> printf("\nWeekly Entry Level = " + WriteVal(EntryLevel,8.4));
>
> //***** end code: watch out for line wraps and Yahoo funny formatting
> spaces********
>
>

__._,_.___

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




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___