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

[amibroker] stop loss - help



PureBytes Links

Trading Reference Links





i am coding a stop loss that changes 
after two bars (when  I short or buy a contract).
It is not working....any idea 
why?
if (<FONT 
face="Courier New" color=#0000ff>LastValue<FONT 
face="Courier New">(<FONT face="Courier New" 
color=#0000ff>BarIndex())<=<FONT 
face="Courier New" color=#ff00ff>2)
{
ApplyStop<FONT 
face="Courier New">(stopTypeTrailing,stopModePercent,<FONT 
face="Courier New" color=#ff00ff>4<FONT 
face="Courier New">,True,False); <FONT face="Courier New" 
color=#008000>//4%
}
else
{
ApplyStop<FONT 
face="Courier New">(stopTypeTrailing,stopModePoint,BuyPrice,True,False);
}
 
PositionValue = MarginDeposit = 1;
PositionSize = 1;
PointValue = 50;






Yahoo! Groups Sponsor


  ADVERTISEMENT 









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.