Hi all.
I want to create a continuous scanner for the breakout of the previous 1min candle low
In TD Ameritrade ThinkorSwim i have created this:
#Wizard text: Current bar's
#Wizard input: price1
#Wizard text: gaps
#Wizard input: percentage
#Wizard text: % or more above the previous
#Wizard input: price2
input price1 = close;
input percentage = 2.0;
input price2 = low;
def x = 1 + percentage / 100;
def term = x * price2[1];
plot scan = price1 > term;
In Medved Trader i have tried:
public void MainCalculation()
{
if (Close > Low[1]*1.02)
{
SetColorAndShape("Brakeout", PBShape.ArrowNE, 0xFF00C50C);
TriggerAlert("Brakeout");
SetScanResult("Brakeout");
return;
}
It does not seem to work because i need to create a variable X , where X = Low[1] * 1.02 // >2% procent of the previous 1min candle low //
The problem is that it does not let me define this variable
Therefore after it will be simple as i can do if(Close > X) {....}