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

[amibroker] Re: Problems with tracing variable value through exploration...


  • Date: Tue, 15 Dec 2009 19:41:50 -0000
  • From: "Mike" <sfclimbers@xxxxxxxxx>
  • Subject: [amibroker] Re: Problems with tracing variable value through exploration...

PureBytes Links

Trading Reference Links

Try passing a scaler to the _TRACE instead of an array. Since you are interested in the most recent value, just use the LastValue function in the trace:

_TRACE("sell..." + LastValue(Sell) + " buy..." + LastValue(Buy));

_TRACE("Close..." + LastValue(C));

_TRACE("MovAvg..." + LastValue(MovAvg));

Mike


--- In amibroker@xxxxxxxxxxxxxxx, Gray Bohon <egbohon@xxx> wrote:
>
> List: 
> 
> I've done some more tinkering with application of the below (very simple) code.  I am using IB's data feed.  What I've discovered is that, if I take my exploration and double-click it to launch it as a "chart," the values are reported properly to the Trace window, RT.
> 
> If I run the exporation from the Automatic Analysis window, it reports the RT values of the Close properly, however, the values of the moving average are always reported as 0.
> 
> Does anyone have an idea of why this is happening?  
> 
> (This is actually a major problem for me, since I want to run the Exploration every few seconds on a list of tickers, not just one....)
> 
> Thx. GB.
> 
> 
> 
> 
> ________________________________
> From: Gray Bohon <egbohon@xxx>
> To: amibroker@xxxxxxxxxxxxxxx
> Sent: Mon, December 14, 2009 2:24:54 PM
> Subject: Problems with tracing variable value through exploration...
> 
> 
> I am doing some testing with explorations.  I'm trying to get what seems like a very simple exploration to work, and its not doing what I would have expected.
> 
> Here is my code:
> 
> // Test the MA crossover exploration...ã??// long trades entry and exit rules:MovAvg = EMA( Close, 15);BuySell
> ã??Filter=Buy OR Sell; =  = Cross( Close, MovAvg );Cross( MovAvg, Close );AddColumn
> ã??( Close, "Close");_TRACE("sell..."+ Sell+ " buy..."+ Buy);_TRACE("Close..."+ C);_TRACE
>  
>  
> I have the exploration set to run every 30 sec, on a chart that has 1-minute bars.  There are plenty of signals that should be triggered by the data.
>  
> For some reason, the variable "MovAvg" is reported in the trace-log the when I initially run the exploration, but registers a value 0 on subsequent itterations as it autoruns. 
>  
> I think I must be missing a setting or something.  Attached is my autorun setup.  
>  
> Any ideas on why this is happening?  The value of the Close is reported accurately by every itteration of the autorun.  The values of Buy and Sell are also reported, though I think is not working right based on the problem with "MovAvg."
>  
> Thanks in advance.
>  
> -GB("MovAvg..."+ MovAvg);
>




------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    amibroker-digest@xxxxxxxxxxxxxxx 
    amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

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