PureBytes Links
Trading Reference Links
|
Hello All,
I am having a problem with my coding for my stoploss with ApplyStop.
I want to set my stoploss 5 points below the lowest value(LLV) of the
last 5 days starting with the day before the trade. The trade stops
out for a loss but not at the correct point. I tried playing with
the settings but I was pretty much grasping at straws. Any help
would be appreciated.
The code is below:
typeLoss=2;typeProfit=3;typeTrailing=4;typeNBar=6;//Stop Settings
[buy conditions]
/*Stop Loss Conditions*/
Sell=0;
Stoploss=ValueWhen(Buy,Ref(LLV(L,5),-1)-.05); //I also tried it
without the ValueWhen
ApplyStop(stopTypeLoss,stopModePoint,Stoploss,True,True);
SellPrice=C;
Equity(1);
Thanks.
Rob
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->
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 http://docs.yahoo.com/info/terms/
|