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