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

RE: [amibroker] Sell only if Gain > Target Gain.



PureBytes Links

Trading Reference Links




<SPAN 
class=367153013-11102003>sorry, yes, shouldn't post before 
caffeine...
<SPAN 
class=367153013-11102003> 
<SPAN 
class=367153013-11102003>I'm still not sure I'm understanding what your cond2 is 
supposed to be. do you mean to refer to buyprice at the time of the buy, not on 
the current day? i<FONT face="Courier New" color=#0000ff 
size=2>f so, I think that'd be<FONT 
face="Courier New" color=#0000ff size=2><SPAN 
class=367153013-11102003> ValueWhen(Buy, BuyPrice).
<SPAN 
class=367153013-11102003> 
<SPAN 
class=367153013-11102003>if I'm to be trusted on this little 
caffeine...
<SPAN 
class=367153013-11102003> 
<SPAN 
class=367153013-11102003>dave
<BLOCKQUOTE 
>But 
  a Profit stop would overide the sell crossever wouldn't 
  it?Michael.At 08:48 AM 11/10/2003 -0400, you wrote:
  <FONT face="Courier New, Courier" 
    color=#0000ff size=2>you could also use a profit stop, if I'm udnerstanding 
    what you're trying to do. <FONT 
    face="Courier New, Courier" color=#0000ff size=2>dave
    
      How does one reference the Opening position price for a long 
      trade?
      I wish to make a sell condition based on the current gain.
      ie
      Buy=<FONT 
      face="Courier New, Courier" color=#0000ff>Cross(<FONT 
      face="Courier New, Courier" color=#0000ff>MA(C,<FONT 
      face="Courier New, Courier" color=#ff00ff>2),<FONT 
      face="Courier New, Courier" color=#0000ff>MA(C,<FONT 
      face="Courier New, Courier" color=#ff00ff>24));
      cond1 = <FONT face="Courier New, Courier" 
      color=#0000ff>Cross(<FONT face="Courier New, Courier" 
      color=#0000ff>MA(C,<FONT face="Courier New, Courier" 
      color=#ff00ff>24), <FONT face="Courier New, Courier" 
      color=#0000ff>MA(C,<FONT face="Courier New, Courier" 
      color=#ff00ff>2));
      cond2 = (BuyPrice / Close)*<FONT face="Courier New, Courier" 
      color=#ff00ff>100 > <FONT face="Courier New, Courier" 
      color=#ff00ff>104;
      Sell = cond1 AND cond2;
      Im not sure if this code is actuualy working correctly. (ie 
      buyprice).
      Is it ok to use BuyPrice in this manner?
      MSG.






Yahoo! Groups Sponsor












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



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.