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

RE: Arg! Need help resolving 'print' statement discrepancey



PureBytes Links

Trading Reference Links

Here's a test signal I created to see if I could the ADX to work the way you
described it.  It seems to work.  I tested it on EOD futures data.  At this
point I would say double check your code carefully and make sure that
parameter settings are the same between the screen indicator and the same
indicator in the signal code. You can send your code to me privately (or
post it to the baord) and I will take a look at it.  Often, a second pair of
eyes helps find the bugs.

Value1 = ADX(14);
If Marketposition = 0 And Value1[1] < 20 And Value1 >= 20 Then Buy("B1") At
Market;
If MarketPosition > 0 And BarsSinceEntry >= 10 Then ExitLong("X1") At
Market;


> -----Original Message-----
> From: Robert Cavaleri [mailto:rcavaler@xxxxxxxxxxxxx]
> Sent: Saturday, November 18, 2000 11:43 AM
> To: omega-list@xxxxxxxxxx
> Subject: Arg! Need help resolving 'print' statement discrepancey
>
>
>
> I am frustrated. I am working on a strategy that tests for ADX(14) to be
> above a certain level (20) before taking action. I am clearly looking at
> the chart, and the plot with ADX(14) in there, and I can see that it is
> way above 20. If I go to put a print statement in the ADX indicator like
> so:
>
> print ("Bar ", CurrentBar, " IND Value1 ", ADX(14));
>
> I get what I would expect, and see that values are above 20
>
> Bar       1.00  IND Value1     100.00
> Bar       1.00  IND Value1      59.48
> Bar       2.00  IND Value1      59.48
> Bar       3.00  IND Value1      57.69
> Bar       4.00  IND Value1      57.00
> Bar       5.00  IND Value1      54.70
> Bar       6.00  IND Value1      51.79
> Bar       7.00  IND Value1      49.83
> .
> .
> .
>
> However, in my strategy (signal) The test condition is showing the ADX
> value to be below 20 for some reason. This is the print statement in the
> signal:
>
> print ("Bar ", CurrentBar, " SIG Value1 ", ADX(14));
>
> Bar       1.00  SIG Value1       8.47
> Bar       2.00  SIG Value1       5.26
> Bar       3.00  SIG Value1       7.65
> Bar       4.00  SIG Value1       9.17
> Bar       5.00  SIG Value1       8.37
> Bar       6.00  SIG Value1       7.16
> Bar       7.00  SIG Value1       7.15
> .
> .
> .
>
>
> I feel like I am stuck, because I can not complete the strategy knowing
> that the ADX comparison is not producing accurate results. I can *see*
> that the adx is above 20 in my plot window. Any clues as to what may be
> going on here? I have only one chart open in my workspace, with the
> ADX(14) plot and  the data for the symbol with a moving average.
>
> Thanks for any help.
>
> Regards,
> Robert
>
>
>
>