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

[amibroker] Does your eSignal data match your QP2 data???



PureBytes Links

Trading Reference Links




Hello,
 
What I've tried to implement is as follows, and is 
also shown below:
 
1.  As of the last bar, Cond1 is true either 
true or false. 
2.  If Cond1 is true, the last value of AZ is 
compared to a previous value of AZ, in this case 9 bars previous.  If 
this is also true then the last value of indicator B is compared to a previous 
value of indicator A, in this case the value 4 bars previous. A BUY 
signal is generated if this is also true. If this last test is false, then 
the next value of AZ is compared to the same prior value of AZ, now 10 bars 
previous.  If true, the next value of B is compared to the same prior value 
of A, now 5 bars previous. This continues until a buy signal is created or the 
AZ test is false.
3.  Cond1 is not to be rechecked in this 
loop. 
4.  Failure of the second step per para. 2 
above, the testing of AZ, terminates the loop and control goes to the test of 
Cond2. Also, if Cond1 is initially false, control should pass to the test 
of Cond2.  
5.  The testing after Cond2 is to operate in 
the same manner as the Cond1 loop.
6.  Initial failure of Cond2 will pass control 
back to the top, and Cond1 will be checked with data from the next 
bar.
7.  The last inequality after the OR in the 
Sell signal is a stop loss exit if an indicator value falls below a previously 
established level.
 
I hope this is relatively clear. The good news 
is that when I check and backtest this, there are no syntax errors nor 
references to future data.  The bad news is that it doesn't generate any 
signals.  A question I have is does the use of Barcount in this manner 
allow the comparison of the last indicator value to the same prior value (always 
at the same bar)?  Any additional thoughts, comments or recommendations on 
how to implement this scheme would be greatly appreciated.  
 
Glen
 

if (Cond1 [BarCount -<FONT 
color=#ff00ff size=2>1])
{
i = 10 ;
j = 5 
;
if (AZ<FONT 
size=2> [BarCount -1<FONT 
size=2>] > AZ 
[BarCount - i ])
Buy = B [ BarCount -<FONT color=#ff00ff 
size=2>1 ] > A [ BarCount - j ] ; 
i = i++ ;
j = j++ ;
}
if (Cond2<FONT 
size=2> [BarCount -1<FONT 
size=2>])
{
i = 10 ;
j = 5 
;
if (AZ<FONT 
size=2> [BarCount -1<FONT 
size=2>] < <FONT 
face=Arial size=2>AZ [BarCount - i ])<FONT 
face=Arial size=2> 
Sell = (B [ BarCount - j ] > A [ 
BarCount -1 ] 
OR F < F [ BarCount - i ] ) ;
i = i++ ;
j = j++ ;
}
 
 


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








Yahoo! Groups Sponsor


  ADVERTISEMENT 












Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/ 
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.