PDA

View Full Version : code question


abikambic
05-01-2007, 10:48 AM
Can these events (statements) be put into a code to trade from and if so what would the code be.

1) TheCurrent bar price of equal to the previous bars high+ 1 tickis the "first" time that a bar broke the previous bar high of that bar.

2)This event (number 1) occured after the "most recent occurence" of a bar that broke its previous bar, low of that bar.

Number 2 event must occur first, than followed by number one. We enter a long position if number 1 occurs after number 2. We also close any open short postion the same time the long postion is opened.

Thanx MUCH.........Steve

NinjaTrader_Ray
05-01-2007, 11:08 AM
Hi Steve,

Yes you can do that but unfortunately we do not provide support in the form writing user requested code. Its not economically feasible for us.

Some pointers though...

if (Close[0] >= (Close[1] + TickSize))
// Condition 1 is true

If you call

EnterLong()

any open short position will be closed first.

We always suggest trying a simple condition first. Make sure its working as you expect. Then add another layer, check if it works and then build step by step...

Ray

abikambic
05-03-2007, 07:03 AM
THANX MUCH FIR THE INPUT