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

Re: entry on current bar



PureBytes Links

Trading Reference Links

Hello  Jeremy,

Issue the order on the closing bar prior to the one on
which you want the entry to take place.

Set up 2 new variables, BuyPrice and SellPrice Then add this code:

BuyPrice = Close + MarketTicks;
SellPrice = close - MarketTicks;

Then enter your orders at the close as

Buy next bar at BuyPrice stop;
Sell next bar at SellPrice stop;



Wednesday, February 8, 2006, 3:10:05 PM, you wrote:

JL> Hi,

JL> Any help for this cut & paste (non-)programmer would be very gratefully
JL> appreciated, please : I am attempting to create a very simple strategy that
JL> enters long or short x ticks from the close of the previous bar, so in
JL> English Language it would be "If on current bar price reaches x ticks from
JL> close of previous bar, then buy or sell ...". I understand that Easy
JL> Language expects to generate orders at the close of the current bar, so I am
JL> endeavouring to get around this.

JL> This is how far I've got, the verification process stops at "stop" !

JL> inputs :
JL> TickDist(1);

JL> vars:

JL> MarketTicks ( TickDist * MinMove / PriceScale);

If currentbar >> Close[1] then buy this bar at (Close[1]+MarketTicks) stop;

JL> else

JL> if currentbar < Close[1] then buy this bar at (Close[1]+MarketTicks) stop;


JL> J.





-- 
Best regards,
 Roger                            mailto:mailrs@xxxxxxxxxx