Print Page | Close Window

Market Thermometer

Printed From: BullCharts Forum
Category: BullCharts
Forum Name: BullScript
Forum Discription: Technical discussion related specifically to the BullScript programming language.
URL: http://www.bullcharts.com.au/forum/forum_posts.asp?TID=444
Printed Date: 24 Apr 2025 at 12:50am
Software Version: Web Wiz Forums 9.69 - http://www.webwizforums.com


Topic: Market Thermometer
Posted By: lmbull
Subject: Market Thermometer
Date Posted: 22 Oct 2007 at 2:27pm
I was wondering if anyone has looked at the safety in the market
 Thermometer.It is just a momentum indicator giving a value from
 -5 to +5.
If todays close > yesterdays close -> temp +2 else if less then -2.
If todays close  > todays open -> temp +2 else if less then -2,
If todays range is > yesterdays close -> +1 else if less then -1

As simple as this seems i am still having trouble adding the +2 etc to a
value such as temp and then having the result come up in a ribbon with a string of nuumbers.



Replies:
Posted By: blackdog
Date Posted: 22 Oct 2007 at 6:59pm
Imbull,
 
You can only set a varable once in BC. So you have to code it the long way. I had a bit of a play with it and here is some coding for you to start with.
 

[description="the safety in the market Thermometer. It is just a momentum indicator giving a value from

-5 to +5.

If todays close > yesterdays close -> temp +2 else if less then -2.

If todays close > todays open -> temp +2 else if less then -2,

If todays range is > yesterdays close -> +1 else if less then -1"]

[target=Ribbon; category=zzz]

 

 

CgtC:=loadSymbol("XAO",C)>hist(loadSymbol("XAO",C),1);{todays close > yesterdays close}

CgtO:=loadSymbol("XAO",C)>loadSymbol("XAO",O); {todays close > todays open}

RgtC:=loadSymbol("XAO",H)>hist(loadSymbol("XAO",C),1); {todays range is > yesterdays close}

Therm:= if(CgtC and CgtO and RgtC,5,

if(CgtC and CgtO {and not RgtC}, 3,

if(CgtC {and not CgtO} and RgtC, 1,

if({not CgtC and }CgtO and RgtC, 1,

if(CgtC {and not CgtO and not RgtC}, -1,

if({not CgtC and} CgtO {and not RgtC}, -1,

if({not CgtC and not CgtO and} RgtC, -3,-5)))))));

[color=Dark green; name=+5]

[fillstyle=solid]

Therm= 5;

[color=light green; name=+3]

[fillstyle=solid]

Therm = 3;

[color=light green; name=+1]

[fillstyle=narrow vertical]

Therm = 1;

[color=pink; name=-1]

[fillstyle=narrow vertical]

Therm = -1;

[color=pink; name=-3]

[fillstyle=solid]

Therm = -3;

[color=red; name=-5]

[fillstyle=solid]

Therm= -5;

[color=White]

 



Posted By: lmbull
Date Posted: 23 Oct 2007 at 1:47am
Thank you  Blackdog for your quick response. This was exactly what I
was looking for, although the full use of its implementation still needs to
be looked into. At least now I can examine it in more detail even though
it is just another momentum measurement.
My coding years seem to be much too far in the past and need a lot more work.
                  



Print Page | Close Window

Bulletin Board Software by Web Wiz Forums® version 9.69 - http://www.webwizforums.com
Copyright ©2001-2010 Web Wiz - http://www.webwiz.co.uk