Use Wizard to identify bar or daily changes
Author: chuy
Creation Date: 7/16/2008 11:36 AM
profile picture

chuy

#1
Being non-programmer, I rely on the Wizard and the Screener immensely. Naturally one is extremely limited in scope of programs.

However, most of the basic steps seem to be addressed by the Wizard such as compare current day or bar (close, high, low, volume) with prior day or bar. However, I have not figured out how to use Wizard to analyze a specific bar or day when:
(1) in an uptrend, bar or daily price reaches a higher high, but price closes lower than its open
or
(2) in a downtrend, price reaches a lower low, but price closes above its open

Is there anyway to use the Wizard to identify these intra-day or intra-bar shifts in sentiment? It is not possible just by comparing to prior bars or days to identify current changes.

Appreciate any Wizard help or simple program to identify such unique variations in trends.

profile picture

Eugene

#2
Wealth-Lab .NET » General » Use Wizard to identify bar or daily changes
QUOTE:
Being non-programmer, I rely on the Wizard and the Screener immensely.


Because there's no standalone Screener tool in WL .NET, perhaps you've missed the forum? If not here's a WL5 snippet:

CODE:
Please log in to see this code.
profile picture

chuy

#3
Eugene, thank you for hour help. As I discretely intimated, my programming skills are nil. However, I believe that I input your code correctly, but got some error messages that I do not know how to respond to.

The error messages were:
error CS0103@(23,17): The name 'color' does not exist in the current context.
error CS0103@(23,24): The name 'color' does not exist in the current context.
error CS0019@(27,7): Operator '&' cannot be applied to operands of type'double' and 'bool'.
error CS0019@(31,8): Operator '&' cannot be applied to operands of type'double' and 'bool'.

I can use the Wizard to compare 2 days, but I would like to also analyze the current bar or day and how it closed in contrast to its opening.

I am grateful for any assistance that you can provide.
profile picture

Cone

#4
These are compilation errors.
Open a new Strategy Window (Ctrl+Shift`+S), make sure that you remove any existing code in the Editor (Ctrl+A, Del), and make sure that what you copied is precisely what's shown above. Click the "Run the Strategy" button after you paste it. There are no errors in the code.
profile picture

Eugene

#5
QUOTE:
The error messages were:


When creating a new Strategy window and pastnig the entire code above, have you made sure that all existing contents was overwritten?
profile picture

chuy

#6
Many thanks Eugene and Cone. Got it up and running.

I apppreciate your help and patience.
profile picture

chuy

#7
The program is working good, but could I please ask a favor for a couple of enhancements.

Biggest problem is that the program is not posting alerts when a stock meets the criteria. The program colored the OHLC bar correctly when there were some hits today but there was no alert signal from the program after today's updating of stocks and no alerts shown.

Also, OHLC bars which match the program criteria are appropriately colored but it would be much more helpful if they were broader. In the same area, the OHLC bars not meeting criteria are difficult to discern in the chart and are so light they are not printing well plus hard on the eyes when reading charts and would more useful if darker.

If it is not an imposition, would those enhancements be possible?

Thank you for your consideration of this request.
profile picture

Eugene

#8
QUOTE:
Biggest problem is that the program is not posting alerts when a stock meets the criteria. The program colored the OHLC bar correctly when there were some hits today but there was no alert signal from the program after today's updating of stocks and no alerts shown.


Please be specific when reporting a problem. You need to specify as much details as possible: what tool, which symbols, which data provider, the code used, data loading control settings to name a few.

However the code above, if you had it in mind, should not generate any alerts because it's not programmed to do so. It only colors the bars up to your specification.
profile picture

Eugene

#9
QUOTE:
Also, OHLC bars which match the program criteria are appropriately colored but it would be much more helpful if they were broader.


You can right click on the chart, then select "Chart Style Settings", and enable "Fill CandleSticks" option to make them look broader.

QUOTE:
In the same area, the OHLC bars not meeting criteria are difficult to discern in the chart and are so light they are not printing well plus hard on the eyes when reading charts and would more useful if darker.


It is ruled by directive below. The color is semi-transparent but you're in control of it:

CODE:
Please log in to see this code.


After typing Color and hitting the dot symbol on the keyboard, IntelliSense pops up and allows to specify any color:

CODE:
Please log in to see this code.
profile picture

chuy

#10
Thank you for your continued excellent assistance.

I will make the changes that you outlined.

My sole source of data is Fidelity for Active Trader Pro and Wealth-Lab. Strictly using to trade stocks and indexes.

My Wizard scripts in the past have included identifying real-time intraday alerts or alerts at day's end.

Is there any code that I can borrow from other programs and paste in the above program to get it to post intraday or end- of- day alerts?
profile picture

Cone

#11
QUOTE:
Is there any code that I can borrow from other programs and paste in the above program to get it to post intraday or end- of- day alerts?


"Tons" of code. If you pasted all of it into your script it would do the same thing as this single line:

CODE:
Please log in to see this code.
profile picture

chuy

#12
Thanks Cone, I am probably communicating incorrectly. Numbers of Alerts would not be useful

I am looking for the program to tell me on a daily basis or on an intraday basis if a stock matches the program's criteria.

The program has been changed to include the most recent code but that is telling me how many times a stock has met criteria in the past.

For example, I ran revised program against watchlist of 23 stocks and got over 19,000 alert with 988 of those for AAPL and AAPL would not be in alert status on daily basis because the stock did meet program criteria yesterday. All 988 alerts were then listed citing today's date. When ran on 30-minute intraday, program gave over 12,000 Alerts.

My intent was to show Wizard-type alerts on a daily or intraday basis. Daily alerts were active until the next day when they no longer met program objectives or intraday alerts were addressable until the last Alert bar had been superceded by another completed bar.

Sorry, starting to sound complicated. Just trying to identify on-going Alerts (daily or intraday) which are current without having to continually look at each individual chart and let the program tell me which stock just hit criteria.

profile picture

Eugene

#13
chuy,

I realize that there's learning curve for a non-programmer but taking a look into the language/application guides to get some basic concepts will benefit you.

You've got so much false alerts because of an incorrect application of code above. Notice what the comment line said:
QUOTE:
// Place as the last line in a script to always get an Alert

If you just paste the line into the code it will trigger an alert on each bar regardless of your condition. That's why for the "program" to show only actual alerts, that line must be appropriately condition'ed. To get the picture:

CODE:
Please log in to see this code.

profile picture

chuy

#14
Excellent, thank you very much Eugene. You and Cone have been extremely helpful.

This highlights a raw indicator for me of a stock to watch.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).