I am trying to modify the TOS script called parabolicSARcrossover to also include a condition of one MA being greater than another. The actual plot command in the script is this (just for reference, no problems with this command):
plot signal = crosses(sar, close, CrossingType == CrossingType.Bearish);
I wanted to add a condition for this command. I already correctly defined two other parameters called "shortMA" and "longMA".
Here was my intention:
if shortMA < longMA then plot signal = crosses(sar, close, CrossingType == CrossingType.Bearish);
I played with a few different syntaxes and can't get it to resolve syntax errors. For instance, I tried:
if shortMA < longMA {plot signal = crosses(sar, close, CrossingType == CrossingType.Bearish)};
Can someone recommend the right syntax for this string?
plot signal = crosses(sar, close, CrossingType == CrossingType.Bearish);
I wanted to add a condition for this command. I already correctly defined two other parameters called "shortMA" and "longMA".
Here was my intention:
if shortMA < longMA then plot signal = crosses(sar, close, CrossingType == CrossingType.Bearish);
I played with a few different syntaxes and can't get it to resolve syntax errors. For instance, I tried:
if shortMA < longMA {plot signal = crosses(sar, close, CrossingType == CrossingType.Bearish)};
Can someone recommend the right syntax for this string?