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

[amibroker] How does it work



PureBytes Links

Trading Reference Links

hi,

in the simplest form you can use for instance:

stopLoss = 1;
ApplyStop(stopTypeLoss,stopModePoint,stopLoss,ExitAtStop = 1,Volatile = False, ReentryDelay = 1 );

What ApplyStop sees is an array called stopLoss that has the same length as the Close or Open array and all values are 1. So if your BuyPrice = 30 then the stoploss will trigger at 29 and therefor the SellPrice will be 29. Same as you short at 30, ShortPrice = 30 then the stoploss will trigger at 31 and the CoverPrice will be 31.


Now you can define you stopLoss a bit more complicated. It is not constant through time but it depends on the ATR:

stopLoss = ATR(1);
ApplyStop(stopTypeLoss,stopModePoint,stopLoss,ExitAtStop = 1,Volatile = False, ReentryDelay = 1 );

So if you use applystop as shown above it will look at the entry price and the swing it is allowed to make which you define in the amount parameter.

What I believe is your problem is that you define an absolute stoplevel and what you need to define is a stop amount with respect to the entry price. Similar to the ATR formulation. Getting back to the simple example. Buy try to define a stoplevel 29 as a stoplevel for your entry at 30. That will not work. You have to enter a stoplevel of 1.

regards, Ed

  ----- OriginaApplyStop(stopTypeLoss,stopModePoint,stopLoss,ExitAtStop = 1,Volatile = False, ReentryDelay = 1 );l Message ----- 
  From: hotdayinlimbo 
  To: amibroker@xxxxxxxxxxxxxxx 
  Sent: Wednesday, September 01, 2004 12:53 AM
  Subject: [amibroker] Applystop - Q not in manual.


  Hi all,

  I have an indicator (volatility stop) that sits under the price bars 
  and only re-draws lower when taken out by a low value, otherwise it 
  holds its value or creeps up.  

  My Q:  How does Applystop work with an indicator in the 'amount' 
  field?  Does it take the entry price and subtract the value for a 
  long entry?  Should I use Sell=Low < Volstop?  I am having trouble 
  with either solution.  I also don't understand how applystop can 
  work for longs and shorts at the same time.  If I want to use the 
  high of the entry bar for shorts and the low for longs how does 
  applystop accomplish this?

  Thank you,

  DJ 



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

  Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 


        Yahoo! Groups Sponsor 
              ADVERTISEMENT
             
       
       


------------------------------------------------------------------------------
  Yahoo! Groups Links

    a.. To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/
      
    b.. To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx
      
    c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 



[Non-text portions of this message have been removed]



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