bellbell63
New member
Am new to Thinkscript. I have a study that generates an alert when stock hits hi/low of the day. Have 50 yrs of programming experience but new to Thinkscript. Have written about a dozen so far.
I would like a script that would do the following:
When stock goes up +x% from my average price generate an alert (that I know how to do).
When that happens move the trigger price up another x%. So if my average price is 40 and using 1% when stock hits 40.40 if would get an alert and the new trigger level is 40.40 = + another 1%. It would be acceptable for each trigger to go up 1% from avg price instead of (40x1.01)x1.01x1.01...
And the same on the negative direction (-x%) at each step.
In general how do you make a script run against a watchlist rather than be imbedded in a chart? I would like the above script to watch for x% changes against the "all account positions" or other watchlists. I know this can generate a lot of alerts but they only go to the message box
not mail or phone.
Thanks in advance.
I would like a script that would do the following:
When stock goes up +x% from my average price generate an alert (that I know how to do).
When that happens move the trigger price up another x%. So if my average price is 40 and using 1% when stock hits 40.40 if would get an alert and the new trigger level is 40.40 = + another 1%. It would be acceptable for each trigger to go up 1% from avg price instead of (40x1.01)x1.01x1.01...
And the same on the negative direction (-x%) at each step.
In general how do you make a script run against a watchlist rather than be imbedded in a chart? I would like the above script to watch for x% changes against the "all account positions" or other watchlists. I know this can generate a lot of alerts but they only go to the message box
not mail or phone.
Thanks in advance.