Hi everyone, I was wondering if anyone might be able to help my build a chart indicator? I am new to TS EasyLanguage and looking for a little project to get me going. I am looking to build an indicator that tells me when VWAP is above or below the pre-market high throughout the day . Essentially an IF THEN statement e.g. IF VWAP is above PM High THEN (Highlighted Green) "ABOVE SIGNAL" ELSE IF VWAP is below PM High THEN (Highlighted Red) "BELOW SIGNAL" I am new to coding so any help anyone can give me would be hugely appreciated! I have attached a crude drawing of the type of thing im looking to make. Many Thanks, Tom
Do you have a way to get PM high? I wonder if the OHLCPeriodsAgo function (https://uploads.tradestation.com/uploads/EasyLanguage-Functions-and-Reserved-Words-Reference.pdf) would work to retrieve PM high.
Hi, thanks for getting back to me! OHLCPeriodsAgo function sounds very promising! So I would be able to get the PM high buy finding the High of a specific time period e.g 7am-9.30am and use that value as the PM high?
Why are you not inquiring on the TradeStation forum? Lots of trader folks are helpful. And TradeStation people themselves. As well as many youtube instructional videos. Myself I've been down that rabbit hole too many times, especially with my limited coding "skills", to be of much assistance. Come up with something, no that is not what I want. Try again, close but if you can make it do .... Sorry.
Hi thanks for the comment. I will be posting on the Tradestation forum also. I regularly use this forum and therefore decided to post on here. Many highly knowledgable and friendly users on this site!
I think so -- I never used that function in my own coding, and don't have a platform running right now to test it, so I can't be sure. But that seems to be the trickiest part ... once you get PM high, you can just do: if VWAP > PM High then ... [do something] else ...[do something else] Are you trying to draw an indicator on a chart, or to send a buy/sell signal?
Hi, thanks for the reply! No worries at all, I'll have a play with that function today and see what i can come up with! Okay cool that sounds perfect! Not looking for a buy or sell signal, i was even thinking if i could modify the VWAP indicator to change color depending on if it is above or below PM High, that would be perfect! Green above Red below. Is it possible to modify the color of the VWAP indicator? Many Thanks, Tom
You can create a variable called PMHigh, set it to zero at the end of each session. Then at the beginning of the premarket start a simple If, Then, Else where If High[0] > PMHigh then PMHigh = High[0]. Stop the logic at the end of the premarket session. So the logic would be wrapped in a time If, Then, Else.
Hi thanks for getting back to me! Okay cool perfect i'll have a play and see what i can come up with! Is there a way I could manually input the PM high before the open? Cheers, Tom
Yes, doing it manually is simple, you just use input: PM_high() at the beginning of your script, and then there should be a field you can populate with the number. Are you using multicharts? tradestation? As for the color differences in the plot: I don't usually write plotting functions, so I can't tell off the top of my head. But if you use a charting platform with easylanguage, like multicharts or tradestation, there should be built-in scripts. Open the code for RSI, and you should see how the color changes are coded (most RSI code includes color change when the indicator pops above or below a level).