PureBytes Links
Trading Reference Links
|
1. yes
2. yes, but a sell could be triggered because of the trailing
stop OR because of some other SELL rule. How do you know which?
3. no. SELL==4 is a Boolean statement. The double
= means if SELL is equal to 4
on that day, the statement (Boolean) is true, and true Boolean statements show
as a 1 when plotted. SELL is equal to 4 on that day because when ApplyStop
is triggered, it loads a 4 into SELL. I believe (not sure) that ApplyStop will
load different numbers into SELL when different types of stops are triggered.
Some experimentation would show what numbers are used. Remember that ApplyStop
triggers SELL to end a BUY trade and triggers a COVER to end a SHORT trade, so
to see ApplyStop trigger the end of a SHORT trade, look for COVER==some number.
(If using a trailing type stop)
type =stopTypeLoss - maximum loss
stop,stopTypeProfit - profit target stop,stopTypeTrailing - trailing
stop,stopTypeNBar - N-bar stop
4 & 5. It would make life easier if TJ would directly
allow the signals from ApplyStop to be plotted without checking for changes to
SELL or COVER. (Plot(ApplyStop.....))
6. Equity(1) removes excess BUY and SELL signals and figures
out the stops. All that it does is too extensive to relate here. I suggest that
you load some simple hyperactive buy and sell formula and see what the
differences are between using Equity(1) and not using it.
Something that I haven't seen to much discussion of is the
ORDER of the various statements in a formula. Get the order wrong and some
statements won't work.
I use the order of:
1. BUY, SELL, SHORT, COVER statements
2. Equity(1) statement
3. Position size statements
4. Profit/Loss calculations
You would think that position size should be decided before
buys and sells but for some reason, for what I do, AB needs it to be this
way.
-CS
----- Original Message -----
<BLOCKQUOTE
>
<DIV
>From:
Tony/Dianne
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">Amibroker Group
Sent: Friday, March 28, 2003 5:33
AM
Subject: [amibroker] Sell == 4
Hello,
I am relatively new at using the AA part of AB. I've
been able to code a formula to do what I wished and
felt that the ApplyStop function was what I needed. In
reviewing the documentation for ApplyStop, I noted
the following:
For visual conformation of ApplyStop function,
add the following lines below your ApplyStop formula in Indicator
Builder:Equity(1); // THIS EVALUATES STOPSPlot(Sell==4,"ApplyStop
Sell",colorRed,1|styleOwnScale);Plot(Cover==4,"ApplyStop
Cover",colorGreen,1|styleOwnScale);
I included the code in IB and got a result that was a flat
red line with a spike at the sell point then continuing
the flat red line.
My questions are:
1. Did my result match the intended one?
2. Could one not get a similar result by displaying
the buy/sell arrows?
3. In the Plot(Sell == 4,....................)
statement, do I interpret it correctly to mean: Plot the value of
4 if the value of Sell equals 4?
4. I am comfortable with the concept that Sell can
hold the values of 0 or 1, indicating False/True. Where does
the
value of 4 come from? I could not
find any reference in Help or group messages.
5. If Sell can hold the value 4, can it also hold the values
of 2 or 3 or 5,.........? If so, what are the meaning of the
different values and where can one find
the reference?
6. I do not understand the need for the Equity
statement above. Can someone explain?
I have some other questions on the ApplyStop function, but
will hold that for another post.
Regards,
TonySend
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
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
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
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.
|