below please find two code items that do not work.
in both i am trying to reduce redundant logging.
can you help me to get it to work?
'|********************************************************************
'|*** StockFinder RealCode Condition - version 5.0
'|******************************************************************
'>> reduce the amount of logging!
'>> wll not work?? use log only for first bar of each symbol!
'If isfirstbar Then
' Me.log.info(" symbol= " & currentsymbol & " count= " & count)
'End If
'>> reduce amount of logging!
'>> will not work?? use log for last (count - 15) bars on right!
'If currentindex > (count - 15)
' 'Me.Log.info(" curindex= " & currentindex)
'End If
'>> this works?
If price.Close > price.AVG(21) Then pass
|
bruce l.: you are correct i left out the "="! i am trying to master basic! it's new for me!
please look at code below. i want to know how to write indicater that will screen (pass) and also draw
(plot)? can pass CALL a plot that draws two lines; avg20 and avg50?
is there an error in skeep first 49 below, how about avg50 w/ offset of 1?
'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 4.9
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:Crossing MA
'|******************************************************************
If currentindex < 50 Then
Me.setindexinvalid '* skip first 49? price.avg(50,1) sum how many??
End If
'* else ?? do we need 51 bars to sum price.AVG(50,1)???
If price.AVG(20, 1) < price.AVG(50, 1) AndAlso price.AVG(20) >= price.avg(50) Then pass
'* 1) currentindex = sys count, left to right, old to current; 0k?
'* 2) isfirstbar = y/n, first (0) bar on left; ok?
'* 3) if summation or avg etc. start proc. at "currentindex" + 1; ok?
'* (ex) for avg=50; if curr < 50 then me.setindexinvalid (skip?); ok?
'**questions**
'* some indicators (macd) PLOT two lines; PASS has no lines!
'* 1) how do i call my PLOT code from my PASS code to draw line showing what i just
'* selected; avg20 crosing avg50?
'*--------------------------------------------------------------------------------------
|
'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:macdavgcrs
'|*** Example: plot = price.close - price.close(1)
'|******************************************************************
'=========================================================================
'=== convert: (avg/price.close)*100 to remove $ uom
'=== is me.isfirstbar first physical entry in table, left to right ?????
'=========================================================================
Dim pmvavg20 As Single = price.close 'AVG(20)
plot pmvavg20
'??? what is "overload resolution failed because no accessible 'plot' accepts this
'??? number of arguments.
|
1) see work book, page 3, step 13.
2) i made bubble but it is blank, no images in bubble, no sort to click?
3) did i re-set or remove somthing by accident?
|
how can i limit indicater scan to a set # of bars; last 90 daysor monthes 6 and 7?
the chart or real code editor for my indicaters?
|