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

Re: [amibroker] Re: Dynamic indicators - TJ ?



PureBytes Links

Trading Reference Links

Hi Fred,
if you send me some more information/links/code
about Hilbert Period etc. then I can  try to implement it.
I must admit I'm new to Hilbert stuff (Hilbert Transformations/Periods?)
but it sounds interessting and I would like to learn it too.
UM


----- Original Message ----- 
From: "Fred" <fctonetti@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Thursday, April 17, 2003 5:13 PM
Subject: [amibroker] Re: Dynamic indicators - TJ ?


> UM,
> 
> I don't think so but I'd be happy to try and follow your explanation 
> if you provide one ... I posed this question to TJ but I did not get 
> a response.
> 
> Take for example the case I used the other day where say I want check 
> the slope of linear regression which could be written as 
> 
> LRS = LinRegSlope(C, Y);
> 
> In it's simple form Y would be a constant, but lets say I wanted Y to 
> be equal to the Hilbert Period and for LRS to be calculated bar to 
> bar based on what the Hilbert Period is as of that bar ... Is that 
> doable ?  If so I'd like to see an example as to how whether in a For 
> loop or otherwise.
> 
> Thanks in advance,
> 
> Fred
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, uenal.mutlu@xxxx wrote:
> > Hi Fred,
> > I think this is already possible if the
> > func is used with different periods 
> > within the new loop constructs.
> > UM
> > 
> > 
> > ----- Original Message ----- 
> > From: "Fred" <fctonetti@xxxx>
> > To: <amibroker@xxxxxxxxxxxxxxx>
> > Sent: Thursday, April 17, 2003 3:33 PM
> > Subject: [amibroker] Re: Dynamic indicators
> > 
> > 
> > > UM,
> > > 
> > > Beyond that I'd like to have the ability to have the PERIODS be 
> > > varied bar by bar.
> > > 
> > > --- In amibroker@xxxxxxxxxxxxxxx, uenal.mutlu@xxxx wrote:
> > > > Here is an example from the help:
> > > > 
> > > > --------------------------------------------------------------
> > > > CCI  -  commodity channel index
> > > > 
> > > > SYNTAX  
> > > >   CCI( periods = 14 )
> > > >   CCIa( array, periods = 14 )  
> > > > 
> > > > RETURNS ARRAY  
> > > > 
> > > > FUNCTION  
> > > >   Calculates the Commodity Channel Index (using periods 
> averaging 
> > > range ).
> > > >   Second version (CCIa) accepts input array, so CCI can be 
> applied 
> > > to array 
> > > >   different than close. (CCIa exists in AFL 2.2+ only 
> (v.4.20+))  
> > > > 
> > > > EXAMPLE 
> > > >   CCI( 14 )
> > > >   CCIa( High, 14 );  
> > > > --------------------------------------------------------------
> > > > 
> > > > Here, we see that there is also a second form of this indicator
> > > > where the user can pass his own input array to the function. 
> > > > UM
> > > > 
> > > > 
> > > > ----- Original Message ----- 
> > > > From: "Graham" <gkavanagh@xxxx>
> > > > To: <amibroker@xxxxxxxxxxxxxxx>
> > > > Sent: Thursday, April 17, 2003 3:08 PM
> > > > Subject: RE: [amibroker] Re: Dynamic indicators
> > > > 
> > > > 
> > > > > I obviously do not understand what is meant by static and 
> dynamic
> > > > > But then I prob wouldn't understand the explanation either :)
> > > > > 
> > > > > Cheers,
> > > > > Graham
> > > > > http://groups.msn.com/ASXShareTrading
> > > > > http://groups.msn.com/FMSAustralia
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Fred [mailto:fctonetti@x...] 
> > > > > Sent: Thursday, 17 April 2003 9:07 PM
> > > > > To: amibroker@xxxxxxxxxxxxxxx
> > > > > Subject: [amibroker] Re: Dynamic indicators
> > > > > 
> > > > > Because those are STILL static arguments.
> > > > > 
> > > > > --- In amibroker@xxxxxxxxxxxxxxx, "Graham" <gkavanagh@xxxx> 
> wrote:
> > > > > > Why not just write the indicators in afl. I use them as the 
> > > basic 
> > > > > equation
> > > > > > on many different applications in my search for the 
> ultimate. 
> > > > > Except for a
> > > > > > few they are relatively straightforward
> > > > > > Here are some I have been using. I just replace the 
> variables 
> > > with 
> > > > > what I
> > > > > > want
> > > > > > //ATR = Max of ( (H-L) or ABS(L-ref(C,-1)) or ABS(H-ref(C,-
> 1)) )
> > > > > > myATR = max( h-l, max( abs(l-ref(c,-1)), abs(h-ref(c,-
> 1)) ));
> > > > > > 
> > > > > > //Stochastic
> > > > > > p = 8;
> > > > > > myStochK = (c-LLV(l,p))/(HHV(h,p)-LLV(l,p))*100;
> > > > > > myStochD = EMA((c-LLV(l,p))/(HHV(h,p)-LLV(l,p)),3)*100;
> > > > > > 
> > > > > > //MACD
> > > > > > ms = 26;
> > > > > > mf = 12;
> > > > > > mg = 9;
> > > > > > myMACD = ema(c,mf) - ema(c,ms);
> > > > > > mySignal = ema(myMACD,mg);
> > > > > > 
> > > > > > An example of an application I have been researching for 
> > > amusement
> > > > > > //OBV
> > > > > > X = iif(c>ref(c,-1),1,iif(c<ref(c,-1),-1,0));
> > > > > > myOBV = v;
> > > > > > myOBV = ref(myOBV,-1) + X*v;
> > > > > > //MACD of OBV
> > > > > > Y = myOBV()/100000;
> > > > > > ms = 26;
> > > > > > mf = 12;
> > > > > > mg = 9;
> > > > > > myMACD = EMA(Y,mf) - EMA(Y,ms);
> > > > > > mySignal = EMA(myMACD,mg);
> > > > > > 
> > > > > > Cheers,
> > > > > > Graham
> > > > > > http://groups.msn.com/ASXShareTrading
> > > > > > http://groups.msn.com/FMSAustralia
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: uenal.mutlu@xxxx [mailto:uenal.mutlu@x...] 
> > > > > > Sent: Thursday, 17 April 2003 8:25 PM
> > > > > > To: amibroker@xxxxxxxxxxxxxxx
> > > > > > Subject: [amibroker] Dynamic indicators
> > > > > > 
> > > > > > Hi CS, DT and all,
> > > > > > 
> > > > > > I too would like dynamic (user modifyable) args to
> > > > > > internal functions. For example the MACD and SIGNAL
> > > > > > functions work only on the Close price. It would be a 
> > > > > > plus if user could override the default Close array it 
> > > internally 
> > > > > uses.
> > > > > > The function prototypes then would look like:
> > > > > >   MACD(fastperiod = 12, slowperiod = 26, sourcearray = 
> Close);
> > > > > >   SIGNAL(fastperiod = 12, slowperiod = 26, signalperiod = 
> 9, 
> > > > > sourcearray =
> > > > > > Close);
> > > > > > (here the last param was added).
> > > > > > 
> > > > > > then such things like the following would be possible:
> > > > > >   MACD(12,26,C) > MACD(12,26,EMA(C, 9)); 
> > > > > > or you could create the MACD for volume etc... :-)
> > > > > > 
> > > > > > UM
> > > > > > 
> > > > > > 
> > > > > > ----- Original Message ----- 
> > > > > > From: "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx>
> > > > > > To: <amibroker@xxxxxxxxxxxxxxx>
> > > > > > Sent: Thursday, April 17, 2003 2:01 PM
> > > > > > Subject: [amibroker] Re: AmiBroker 4.31.0 BETA Question
> > > > > > 
> > > > > > 
> > > > > > > CS,
> > > > > > > something must be more clear:
> > > > > > > Do you speak for a variable period for RSI(periods) or 
> for 
> > > the 
> > > > > RSI of 
> > > > > > > another function?
> > > > > > > When we write RSI(12), we mean RSI calculated on Close, 
> > > > > periods=12.
> > > > > > > An example of variable period should be like
> > > > > > > per=10+cum(1)%10;
> > > > > > > W=RSI(per);
> > > > > > > It will not work, since built-in RSI() does not accept 
> > > variable 
> > > > > > > period.
> > > > > > > The second case is to apply the RSI transformation on 
> another 
> > > > > > > function, say Stochastics.
> > > > > > > This is already included through the RSIA(Array,periods) 
> > > > > function, 
> > > > > > > but still for a fixed period.
> > > > > > > It would be better to be more specific, which improvement 
> do 
> > > you 
> > > > > ask. 
> > > > > > > DT
> > > > > > > --- In amibroker@xxxxxxxxxxxxxxx, "CS" <csaxe@xxxx> wrote:
> > > > > > > > 
> > > > > > > > Since converting some of my systems to dynamic 
> parameter 
> > > input, 
> > > > > my 
> > > > > > > success (profits) has increased dramatically.
> > > > > > > > Unfortunately, most people don't know the difference 
> > > between 
> > > > > > > dynamic (variable) and static (constant) parameter inputs.
> > > > > > > > Simplistic Hint:  Static-  RSI(14);    Dynamic-  RSI( 
> ATR
> > > (3) );
> > > > > > > > 
> > > > > > > > I have asked TJ to go back and re-work indicators and 
> > > functions 
> > > > > to 
> > > > > > > accept dynamic inputs, but he said that only three other 
> > > people 
> > > > > had 
> > > > > > > asked for the same thing, so it is low on his priority 
> list. 
> > > So, 
> > > > > I 
> > > > > > > have had to resort to manually coding each 
> indicator/function 
> > > in 
> > > > > > > script, and script sucks. Error messages while debugging 
> are 
> > > so 
> > > > > > > vague, that they are useless.
> > > > > > > > The recent inclusion of native AFL looping and flow 
> control 
> > > > > will 
> > > > > > > help.
> > > > > > > > 
> > > > > > > > There are some functions that accept dynamic input such 
> as 
> > > HHV, 
> > > > > > > LLV, Sum, Ref, AMA, AMA2, WMA, DEMA, TEMA and MA.
> > > > > > > > 
> > > > > > > > It would be nice if all new functions/indicators 
> created 
> > > would 
> > > > > > > accept dynamic inputs.
> > > > > > > > 
> > > > > > > > -CS
> > > > > > > >   ----- Original Message ----- 
> > > > > > > >   From: Fred 
> > > > > > > >   To: amibroker@xxxxxxxxxxxxxxx 
> > > > > > > >   Sent: Wednesday, April 16, 2003 4:26 PM
> > > > > > > >   Subject: [amibroker] Re: AmiBroker 4.31.0 BETA 
> Question
> > > > > > > > 
> > > > > > > > 
> > > > > > > >   I believe LinRegSlope takes as it's second argument a 
> NON 
> > > > > time 
> > > > > > > >   variant argument or a constant NOT an array like for 
> > > example 
> > > > > AMA 
> > > > > > > >   would.  I don't know but I supect the code I put in 
> my 
> > > > > original 
> > > > > > > post 
> > > > > > > >   won't work any way or if it has a chance of working I 
> > > > > wouldn't 
> > > > > > > know 
> > > > > > > >   how to modify it so it does, maybe 
> > > > > > > > 
> > > > > > > >   LRS = LinRegSlope(close[ i ], HilbertPeriod[ i ]);
> > > > > > > 
> > > > > > Send BUG REPORTS to bugs@xxxx



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get a FREE REFINANCE QUOTE - click here!
http://us.click.yahoo.com/2CXtTB/ca0FAA/i5gGAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/