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

Re[2]: marketposition in 2000i


  • Date: Mon, 30 Nov 2009 08:33:33 -0500
  • From: Bob Fulks <omegalist@xxxxxxxxxxxx>
  • Subject: Re[2]: marketposition in 2000i

PureBytes Links

Trading Reference Links

I am sure that MarketPosition works on all versions of TradeStation.

The problem must be in some other part of your code.

Bob Fulks

At 01:41 AM 11/30/2009, nevi wrote:
>Hello Bob,
> 
>BF> Try:
>BF> if MarketPosition <> 0 then 
>BF> Buy next bar at market;
>BF> Bob Fulks
> 
>While that code works it doesn't stop multiple longs without a short
>in between.
> 
>I have found most of the MarketPosition statements either work or
>don't do anything but, MarketPosition <> 1 and MarketPosition(1) = 1
>don't seem to work at all.
> 
>When installing 2000i there is a message stating some functions and
>studies from TS4 may not be compatible with 2000i.
> 
>I'm wondering if this code is part of the affected easylanguage,
>possibly to incorporate the strategy builder.
> 
>For now it looks like I'll have to change my signal writing style to
>avoid needing marketposition statements.
> 
>thanks
>nevi
>
>
>BF> At 07:21 AM 11/29/2009, nevi wrote:
>>>Hello omega-list
>>>Trying to get alternating buy/sell signals in 2000i,
>>>This code works fine in TS4
>>>but using 2000i it doesn't appear to do anything
>>>
>>>if marketposition(1)<>1 then begin
>>>buy next bar at market;
>>>end;  
>>>
>>>I have tried several combinations
>>>if marketposition(1)=-1 or marketposition(0)=0 then
>>>if marketposition(1)<>1 and marketposition(1)=-1 or marketposition(0)=0 then
>>>none of them work
>>>Can anyone suggest a way to stop multiple buy signals.
>>>thanks
>>>best regards
>>>nevi