Re: [amibroker] Re: Plotting shapes for applystop -- nbar

 


--------------------------------------------
On Mon, 2/22/16, portfoliobuilder99@gmail.com [amibroker] <amibroker@yahoogroups.com> wrote:

Subject: [amibroker] Re: Plotting shapes for applystop -- nbar [1 Attachment]
To: amibroker@yahoogroups.com
Date: Monday, February 22, 2016, 3:27 PM


Thanks, didn't know I could call Sell function more than once.

norm








[Attachment(s) from
portfoliobuilder99@gmail.com [amibroker] included
below]


After looking in the Knowledge Base, I
copied in some of your lines and got a Plot. Not sure if
this is what you were looking for?
app = Optimize("app",
15, 4, 20, 1 );
SetTradeDelays(0,0,0,0);
Buy = Cross( MACD(), Signal()
);Sell = 0;ApplyStop( 3, 2, app, True
); Equity( 1, 0 ); // evaluate stops,
all quotes
InTrade =
Flip( Buy, Sell );
SetOption("EveryBarNullCheck",
True );stopline = IIf( InTrade, HighestSince(
Buy, High ) -app, Null );
PlotShapes(Buy*shapeUpArrow,colorGreen,0,Low);PlotShapes(Sell*shapeDownArrow,colorRed,0,High);
Plot(
Close,"Price",colorBlack,styleBar);Plot(
stopline, "trailing stop line", colorRed
);
https://www.amibroker.com/kb/2007/03/24/how-to-plot-a-trailing-stop-in-the-price-chart/
 









#yiv9481972967 #yiv9481972967 --
#yiv9481972967ygrp-mkp {
border:1px solid #d8d8d8;font-family:Arial;margin:10px
0;padding:0 10px;}

#yiv9481972967 #yiv9481972967ygrp-mkp hr {
border:1px solid #d8d8d8;}

#yiv9481972967 #yiv9481972967ygrp-mkp #yiv9481972967hd {
color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px
0;}

#yiv9481972967 #yiv9481972967ygrp-mkp #yiv9481972967ads {
margin-bottom:10px;}

#yiv9481972967 #yiv9481972967ygrp-mkp .yiv9481972967ad {
padding:0 0;}

#yiv9481972967 #yiv9481972967ygrp-mkp .yiv9481972967ad p {
margin:0;}

#yiv9481972967 #yiv9481972967ygrp-mkp .yiv9481972967ad a {
color:#0000ff;text-decoration:none;}
#yiv9481972967 #yiv9481972967ygrp-sponsor
#yiv9481972967ygrp-lc {
font-family:Arial;}

#yiv9481972967 #yiv9481972967ygrp-sponsor
#yiv9481972967ygrp-lc #yiv9481972967hd {
margin:10px
0px;font-weight:700;font-size:78%;line-height:122%;}

#yiv9481972967 #yiv9481972967ygrp-sponsor
#yiv9481972967ygrp-lc .yiv9481972967ad {
margin-bottom:10px;padding:0 0;}

#yiv9481972967 #yiv9481972967actions {
font-family:Verdana;font-size:11px;padding:10px 0;}

#yiv9481972967 #yiv9481972967activity {
background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}

#yiv9481972967 #yiv9481972967activity span {
font-weight:700;}

#yiv9481972967 #yiv9481972967activity span:first-child {
text-transform:uppercase;}

#yiv9481972967 #yiv9481972967activity span a {
color:#5085b6;text-decoration:none;}

#yiv9481972967 #yiv9481972967activity span span {
color:#ff7900;}

#yiv9481972967 #yiv9481972967activity span
.yiv9481972967underline {
text-decoration:underline;}

#yiv9481972967 .yiv9481972967attach {
clear:both;display:table;font-family:Arial;font-size:12px;padding:10px
0;width:400px;}

#yiv9481972967 .yiv9481972967attach div a {
text-decoration:none;}

#yiv9481972967 .yiv9481972967attach img {
border:none;padding-right:5px;}

#yiv9481972967 .yiv9481972967attach label {
display:block;margin-bottom:5px;}

#yiv9481972967 .yiv9481972967attach label a {
text-decoration:none;}

#yiv9481972967 blockquote {
margin:0 0 0 4px;}

#yiv9481972967 .yiv9481972967bold {
font-family:Arial;font-size:13px;font-weight:700;}

#yiv9481972967 .yiv9481972967bold a {
text-decoration:none;}

#yiv9481972967 dd.yiv9481972967last p a {
font-family:Verdana;font-weight:700;}

#yiv9481972967 dd.yiv9481972967last p span {
margin-right:10px;font-family:Verdana;font-weight:700;}

#yiv9481972967 dd.yiv9481972967last p
span.yiv9481972967yshortcuts {
margin-right:0;}

#yiv9481972967 div.yiv9481972967attach-table div div a {
text-decoration:none;}

#yiv9481972967 div.yiv9481972967attach-table {
width:400px;}

#yiv9481972967 div.yiv9481972967file-title a, #yiv9481972967
div.yiv9481972967file-title a:active, #yiv9481972967
div.yiv9481972967file-title a:hover, #yiv9481972967
div.yiv9481972967file-title a:visited {
text-decoration:none;}

#yiv9481972967 div.yiv9481972967photo-title a,
#yiv9481972967 div.yiv9481972967photo-title a:active,
#yiv9481972967 div.yiv9481972967photo-title a:hover,
#yiv9481972967 div.yiv9481972967photo-title a:visited {
text-decoration:none;}

#yiv9481972967 div#yiv9481972967ygrp-mlmsg
#yiv9481972967ygrp-msg p a span.yiv9481972967yshortcuts {
font-family:Verdana;font-size:10px;font-weight:normal;}

#yiv9481972967 .yiv9481972967green {
color:#628c2a;}

#yiv9481972967 .yiv9481972967MsoNormal {
margin:0 0 0 0;}

#yiv9481972967 o {
font-size:0;}

#yiv9481972967 #yiv9481972967photos div {
float:left;width:72px;}

#yiv9481972967 #yiv9481972967photos div div {
border:1px solid
#666666;height:62px;overflow:hidden;width:62px;}

#yiv9481972967 #yiv9481972967photos div label {
color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}

#yiv9481972967 #yiv9481972967reco-category {
font-size:77%;}

#yiv9481972967 #yiv9481972967reco-desc {
font-size:77%;}

#yiv9481972967 .yiv9481972967replbq {
margin:4px;}

#yiv9481972967 #yiv9481972967ygrp-actbar div a:first-child {
margin-right:2px;padding-right:5px;}

#yiv9481972967 #yiv9481972967ygrp-mlmsg {
font-size:13px;font-family:Arial, helvetica, clean,
sans-serif;}

#yiv9481972967 #yiv9481972967ygrp-mlmsg table {
font-size:inherit;font:100%;}

#yiv9481972967 #yiv9481972967ygrp-mlmsg select,
#yiv9481972967 input, #yiv9481972967 textarea {
font:99% Arial, Helvetica, clean, sans-serif;}

#yiv9481972967 #yiv9481972967ygrp-mlmsg pre, #yiv9481972967
code {
font:115% monospace;}

#yiv9481972967 #yiv9481972967ygrp-mlmsg * {
line-height:1.22em;}

#yiv9481972967 #yiv9481972967ygrp-mlmsg #yiv9481972967logo {
padding-bottom:10px;}


#yiv9481972967 #yiv9481972967ygrp-msg p a {
font-family:Verdana;}

#yiv9481972967 #yiv9481972967ygrp-msg
p#yiv9481972967attach-count span {
color:#1E66AE;font-weight:700;}

#yiv9481972967 #yiv9481972967ygrp-reco
#yiv9481972967reco-head {
color:#ff7900;font-weight:700;}

#yiv9481972967 #yiv9481972967ygrp-reco {
margin-bottom:20px;padding:0px;}

#yiv9481972967 #yiv9481972967ygrp-sponsor #yiv9481972967ov
li a {
font-size:130%;text-decoration:none;}

#yiv9481972967 #yiv9481972967ygrp-sponsor #yiv9481972967ov
li {
font-size:77%;list-style-type:square;padding:6px 0;}

#yiv9481972967 #yiv9481972967ygrp-sponsor #yiv9481972967ov
ul {
margin:0;padding:0 0 0 8px;}

#yiv9481972967 #yiv9481972967ygrp-text {
font-family:Georgia;}

#yiv9481972967 #yiv9481972967ygrp-text p {
margin:0 0 1em 0;}

#yiv9481972967 #yiv9481972967ygrp-text tt {
font-size:120%;}

#yiv9481972967 #yiv9481972967ygrp-vital ul li:last-child {
border-right:none !important;
}
#yiv9481972967

__._,_.___

Posted by: normer dude <coblehill@yahoo.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/


.

__,_._,___


EmoticonEmoticon