PureBytes Links
Trading Reference Links
|
Hi,
After reading about flip, I thought great, Remove short break even if a buy has been activated.
SBEvn = L <= ShortPrice - BrkEvnBuff; AddColumn(SBEvn ,"SBEvn");
SBEvnSig = Flip(SBEvn,Buy); AddColumn(SBEvnSig,"SBEvnSig");
stoploss = IIf(SBEvnSig ==1, 0,0.0025);
ApplyStop(stopTypeLoss,stopModePoint, Stoploss,ExitAtStop = 1,Volatile = True);
But in the above, SBEvnSig keeps returning 1!
--- In amibroker@xxxxxxxxxxxxxxx, "firehorse888uk" <firehorse888uk@xxxx> wrote:
>
> Hi,
>
> I want to move my stoploss to break even after the price has exceeded my profits by a certain amount.
>
> Trying to get the following code to work. Using explore, I've found
> SBEvn becomes 1 when the L goes below ShortPrice - BrkEvnBuff,
> but it becomes 0 as soon as the price goes up again! I'm sure there is something simple I can do to make sure it stays a 1!
>
> Thanks.
>
> SBEvn = L <= ShortPrice - BrkEvnBuff;
> stoploss = IIf(SBEvnSig == 1,0,0.0025);
>
> ApplyStop(stopTypeLoss,stopModePoint, Stoploss,ExitAtStop = 1,Volatile = True);
------------------------ Yahoo! Groups Sponsor --------------------~-->
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|