Creating a counter with variable input

StockT8er

Member
VIP
Would it be possible to create a counter with a variable input, to use as a delay timer. increasing the number to create a delay.
And if so what would the code be for the counter.
 
Can you give a bit more detail regarding what it is, exactly, you are trying to do...??? What would you use a counter for a variable delay timer for...??? :unsure:
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

What I thought about while I was out is, using a script, once a signal was trigged it would count the number of marks being that they change many times during a candle and that number count would be a input. you could create a delay to whatever depending on marks counted
Yes trying to create a variable timer. once a buysignal is created to set a delay, and then recheck the the signal to confirm before placing the BuyOrder.
 
Last edited:
Ok... Thanks for the explanation... Unfortunately, my plate is full at the moment but if I get freed up, and nobody steps up, I may be able to take a stab at it...
 
I just have never used script before and tying to understand the logic. I'm studying the one in the PL_Lables Study and make since of it has this one

Code:
script incrementValue {
    input condition = yes;
    input increment =  1;
    input startingValue = 0;

    def _value = CompoundValue(1,
                 if condition
                 then _value[1] + increment
                 else _value[1], startingValue);

    plot incrementValue = _value;
}
;

just trying to think of how to code the rest, substituting Mark of entryprice etc.
 
What I thought about while I was out is, using a script, once a signal was trigged it would count the number of marks being that they change many times during a candle and that number count would be a input. you could create a delay to whatever depending on marks counted
Yes trying to create a variable timer. once a buysignal is created to set a delay, and then recheck the the signal to confirm before placing the BuyOrder.
Are you trying to do this on a scanner or on a chart itself? I do my buy 1-3 bars after the signal appears on a closed bar basing it off the stocks previous behavior and what difference in price between the past several signals to make an estimate of where my profit target will be on the stock. I only use the signals as a guide to approach a trade.
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
453 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top