PureBytes Links
Trading Reference Links
|
Hello Dingo,
Thanks for your code. I have figured it out now. The problem was that i
use multiple parameters to optimize the stop loss and also define the
default stop loss. AA and Charts are using the same code but not the
same paramters. So i had a 20 pips stop in the chart and 50 pips stop
in automatic analysis.
Do you know any way to fix it so that both, the chart and automatic
analysis using the same parameters ?
Regards
Thomas
www.tradingbasis.com
dingo wrote:
From a Graham post:
Here is a simple system with trail stop. Star is
plotted at stop
Buy = Cross( MA(C,10), MA(C,100) );
Sell=0;
ApplyStop(2,1,10,0,0,1);
Plot(C,"close",colorBlack,styleCandle);
Equity(1); // THIS EVALUATES STOPS
PlotShapes(shapeStar*(Sell==4),colorRed,0,H,12);
d
Hi Dingo,
yes, i know and i have read it.
So in my code i have a "normal" stop
loss and a regular exit, but it doesn't work.
Only the regular exit will be ploted.
PlotShapes(IIf(Sell==1,25,IIf(Sell==2,25,-1e10)),Sellcolor,0,SellPrice,0);
Regards
Thomas
www.tradingbasis.com
dingo wrote:
at the bottom of the help screen
for Applystop is the following comment:
Graham Kavanagh
gkavanagh@xxxxxxxxxxxxx
2004-09-30 21:55:42 |
from equity comments
Depending on kind of the stop various values
are written back to sell/cover array to enable you to distinguish if
given signal was generated by regular rule or by stop.
1 - regular exit
2 - max. loss
3 - profit target
4 - trailing
5 - n-bar stop
6 - ruin stop
|
you need to add the approp value
to your if.
d
Hello,
i want to plot shapes at the when the applystop function stopped my
trade.
So i have coded it as described in the amibroker help:
"Using Equity( 1 ) evaluates stops and
writes BACK
signals to sell/cover arrays. Equity(1) also removes
all extra signals. "
Unfortunately i only receive shapes when it was a regular exit but not
when it was a stop exit.
The build-in arrow appear at the stop bar. Can someone help ?
Here is my sample code:
fast = EMA(C,3); slow = EMA(C,10);
Buy=Cross(fast,slow); Sell=Cross(slow,fast);
Short = 0; Cover = 0;
Equity(1);
PlotShapes(IIf(Sell==1,25,IIf(Sell==2,25,-1e10)),Sellcolor,0,SellPrice,0);
Regards
Thomas
www.tradingbasis.com
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.html
SPONSORED LINKS
YAHOO! GROUPS LINKS
|
|