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

Re: MaxTradeHigh Indicator



PureBytes Links

Trading Reference Links

Thanks Bob for your help,
I got the indicator working, my goal was to emulate the built in stop $Risk
Trailing Stop.
This is what I came up with
I don't know why but when I tried putting lines 1 & 2 after lines 3,4 & 5
the indicator didn't work

{ $Risk Trailing Stop }
Input: trailstp(45);
Vars: mth(0), mtl(0), MP(0), maxtradeH(0), mintradeL(0);

mth=maxlist(High,mth[1]);
mtl=minlist(Low,mtl[1]);
MP = I_marketposition;
if MP = 1 and MP[1] < 1 then mth = high;
if MP = -1 and MP[1] >-1 then mtl = low;
maxtradeH=mth - (trailstp*1000) points;
mintradeL=mtl + (trailstp*1000) points;
{ the *1000 is added to the input because my emini data has a lot of extra
zeros }
if I_marketposition =1 then begin
 plot1(maxtradeH,"maxtradeH");
end;
if I_marketposition =-1 then begin
 plot2(mintradeL,"mintradeL");
end;

Neville

-----Original Message-----
From: Bob Fulks <bfulks@xxxxxxxxxxxx>
To: N&M Smith <nmsmith@xxxxxxxxx>
Cc: omega-list@xxxxxxxxxx <omega-list@xxxxxxxxxx>
Date: Sunday, May 20, 2001 10:10 AM
Subject: Re: MaxTradeHigh Indicator


>If the market position = 1 you are setting maxtradeH=0 so you are plotting
the highs.
>
>What you might mean to do is resetit  only when you change position:
>
>  MP = I_marketposition;
>  if MP = 1 and MP[1] < 1 then maxtradeH = 0;
>
>Bob Fulks
>
>
>
>At 6:05 AM -0700 5/20/01, N&M Smith wrote:
>
>>I am having trouble getting this indicator to work,
>>it is only plotting the current high not the maxlist high,
>>any help would be greatly appreciated.
>>Thanks Neville
>>
>>vars: maxtradeH(0),mintradeL(0);
>>maxtradeH=maxlist(High,maxtradeH[1]);
>>mintradeL=minlist(Low,mintradeL[1]);
>>if I_marketposition =1 then begin
>> plot1(maxtradeH,"maxtradeH");
>> maxtradeH=0;
>>end;
>>if I_marketposition =-1 then begin
>> plot2(mintradeL,"mintradeL");
>> mintradeL=999999;
>>end;
>
>