Click here to Login

                                                   Calling SetHashBrush as a conditional?


Josh McCormick
2020-07-10 22:21:12

I'm working on a formula that needs SetHatchBrush called (conditionally) if a simple numeric comparison is true.

Example (in pseudocode):
if myvar < 10 then SetHatchBrush("Percent20", colorWhite|255);

...unfortunately, I can't come up with the proper syntax to conditionally call SetHatchBrush if my numerical comparison is TRUE. I tried using iff but it didn't seem to like the fact that SetHatchBrush doesn't return any variables.

What's the clever way to do this? Or is this not possible?

Josh McCormick

2020-07-13 13:11:20


Best Answer
It is not possible unfortunately.

No more messages


No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"


Trading Items
Trading System based on the Previous Week SPY Return
Better Volume Indicator
Indicator/Price Value on a Specific Trading Date
AAII Sentiment Survey - Historical Data
Lowest Close

How-to Lessons
How to create a custom trading indicator
How to remove a chart pane's margins
How to dynamically update the settings of an indicator
How to download EOD quotes for active and valid stocks only
How to create a mobile database/account

Related Forum Threads
Calling a Function from another Function
Function Call
Allow AMM inputs to be set programmatically in script
Help with a Red/Green positive/negative hatched graph?
Historical Market Cap Data For Delisted Stocks

Blog Posts
Technical Analysis Using Multiple Timeframes - Second Part
Update Chart Layout based on Active Ticker Symbol
Money Management: Optimize the scale-in strategy
How to measure market strength with the composite tool
Display several stock market charts with one click

Create an account
Affiliate Program
Contact Us
Trading Forum
How-to Lessons
About Us
Terms of Use

Copyright 2023
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Follow us on Google+
RSS Trading Items

Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.