♥ 0 |
Hi, I like to add aggregation period 1 hour to the 1st clause of the code below for a study alert in one sentence. I want the aggregation period of the 1st clause to be set at 1 hour, while the 2nd clause is set to the primary period (ie, 5min), which I can choose from thinkorswim. Is it possible? —- i can make the code more detail like below but it’s too long and cumbersome for study alerts. input fastLength = 20; def Value = MovingAverage(averageType, close(period = TimeFrame), fastLength) – MovingAverage(averageType, close(period = TimeFrame), slowLength); def Diff = Value – Avg; plot UP = diff >0 and MACDHistogramCrossover(“fast length” = 30, “slow length” = 90, “macd length” = 80, “crossing type” = “negative to positive”); thanks.
Marked as spam
|