[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scRemBuyTrail() problem



PureBytes Links

Trading Reference Links

Hello,

I know !!! I must write a readme file for the rem.dll
and I'll do it with the help of C. Baude
as I wrote previously the rem buy is a dll for my own use that I give 
to Ami users to help them to manage the exits of a system when the 
exits are dependant of the entryprice.

so I have changed the signification of exit bin, it is now a simple 
counter to exit on a fixed number of days
in your case
1/ if sell is true the exit will be after one day
2/ if sell is false the exit will be immediately after entry bar

A/if you don't use any exits dependant of entry price you don't need 
of rem buy
just write
Buy = Cross(30,RSI());
Sell = Cross(RSI(),70);
equity(1);

to remove redundancy buy signals

B/ if you use a stoplloss the llv(l,3) for example with a binary exit 

you can write

Buy = Cross(30,RSI());
ExitBinary = Cross(RSI(),70);

entryprice = Open;
stopprice = Low;
stoploss = llv(L,3);
trailstop = -1;
target = -1;
exitbin = -1; // this is a simple counter
bars = -1;// this is reserved for a number of bars if close < 
entryprice

scRemBuyTrail
(Buy,entryprice,stopPrice,stopLoss,trailStop,target,exitBin,bars);
Buy = Buy;
Sell = Sell or ExitBinary;




> Stephane
> 
> I'm having some problems with scRemBuyTrail() in the latest REM.DLL.
> 
> I am testing the following code:
> 
> ////////////
> 
> SetTradeDelays(1,1,0,0);
> 
> Buy = Cross(30,RSI());
> Sell = Cross(RSI(),70);
> 
> entryprice = Open;
> stopprice = Low;
> stoploss = -1;
> trailstop = -1;
> target = -1;
> exitbin = Sell;
> bars = -1;
> 
> scRemBuyTrail
(Buy,entryprice,stopPrice,stopLoss,trailStop,target,exitBin,bars);
> Buy = Buy;
> Sell = Sell;
> BuyPrice = entryprice;
> SellPrice = Open;
> 
> ////////////
> 
> 
> I disabled all parameters except 'exitbin' and so I think the 
results should be the same as when I don't use scRemBuyTrail().
> 
> But the problem is that scRemBuyTrail() ignores my Sell statement 
and just exits the next day.
> 
> Can you help? Thanks.