SetStopLoss("", CalculationMode.Price, Variable2, false);
SetProfitTarget("L1", CalculationMode.Price, Variable1);
SetProfitTarget("S1", CalculationMode.Price, Variable3);
Variable0 = MIN(Low, LB_Short)[0];
Print(" Long Entry " + " Long Stop = " + " " + Variable0 + " " + " Close Price = " + Close[0]);
if (Position.MarketPosition == MarketPosition.Long)
{
Variable0 = Low[1] + -1 * TickSize;
Variable1 = MAX(High, LB_Long)[1] + -1 * TickSize;
Print(" Position Long - Updating Variables " + " Long Stop = " + Variable0 + " Long Target = " + Variable1 + " Close = " + Close[0]);
}
Why aren't variables working as targets? They seem to be updating correctly, and I am setting the variables equal to the value of interest from the previous bar [1] not [0] beause exceeeding a max high on bar 0 won't work.
thanks
DaveN
Comment