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

[amibroker] (unknown)



PureBytes Links

Trading Reference Links




<FONT face=Arial color=#0000ff 
size=2>Assuming that your example relates exclusively to EOD then I think you 
may have to go real-time data to do what you want to do. EOD doesn't tell you 
which comes first: during the day: the high or the low. So you can never tell 
which came first, your profit or your loss. Using two ApplyStop() in 
same-day-exit or very short-term trading systems (i.e. when dealing with small 
profits/losses triggers that could both be true during the same day) it is very 
easy to get unrealistic results. I have fallen in that trap a few times 
:-(
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>herman.

  <FONT face=Tahoma 
  size=2>-----Original Message-----From: chassis_73 
  [mailto:tessaglia@xxxxxxxxxxx]Sent: Sunday, May 23, 2004 4:32 
  AMTo: amibroker@xxxxxxxxxxxxxxxxxxxxxx: [amibroker] 
  Sellprice/Applystop problemHi,mates.I'm going crazy 
  about a problem that troubles al my TS.SystemBuy = Cross( 
  RSI(14), 30 );Sell = Cross( 70, RSI(14) );BuyPrice=O*0.9705;//Buy when 
  the stock goes down -2.95% from 
  Open.SetTradeDelays(0,0,0,0);ApplyStop(stopTypeLoss,stopModePercent,2.15,1);ApplyStop(stopTypeProfit,stopModePercent,3,1);ObjectiveI'd 
  like to buy the stock all the days it goes down till about -2.95 % from 
  open.I'd like to sell when Sell = Cross( 70, RSI(14) ) occurs or when i 
  can take profit about 3% from Buyprice.TroublesNo trouble 
  about Buy.It works perfectly.Sell instead has its logic but there's a 
  wrong situation when it's a black candle day.i.d  O 2.42 H 2.42 L 
  2.32 C 2.32 What happens here?Naturally I buy at 2.35 and IN THE SAME DAY 
  i sell at 2.42 to take profit.Obviously it's not possible because the 
  stock went down till 2.32 and I'm losing in fact.Let us suppose that 
  the day after O 2.31 H 2.44 L 2.31 C 2.42 .I 'd like to take my 3% when 
  the stock cross up 2.42 the day after.In the backtest there are a lot of 
  days like this so results are wrong.Naturally I tried many rules but 
  Applystop always prevails over all.Immediate IF function doesn't 
  work.i.d.IIf(C < 
  O,ApplyStop(stopTypeProfit,stopModeDisable,3,1),ApplyStop(stopTypeProfit,stopModePercent,3,1));Has 
  anyone had the same trouble?Best 
  regards,NickSend BUG REPORTS to 
  bugs@xxxxxxxxxxxxxxxxx SUGGESTIONS to 
  suggest@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  


Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html








Yahoo! Groups Sponsor


  ADVERTISEMENT 












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 the Yahoo! Terms of Service.