What can i do to store last known value that is greater then 0 so i can later use it as stop loss, i dont want to have stoploss as 0 or unknown...
private ISeries<double> ll;
ll = FVGIndicator(UseFVGDataSeries, FVGBarsPeriodType, FVGSeriesPeriod, 50, true, ImpulseFactor, 10, MinimumFVGSize, AllBarsSameDirection, FillType, false, false, false, tsSilverBullet1.Add(tsTZDifference), 60, false, tsSilverBullet2.Add(tsTZDifference), 60, false, tsSilverBullet3.Add(tsTZDifference), 60,12,true,10,14,Brushes.Green,Brushes.Red,2,DashS tyleHelper.Solid,true).Values[27];
in onbarupdate
Print("ll:"+ll[0]);
for button to submit order
entryOrder = account.CreateOrder(instr, OrderAction.Buy, OrderType.Market, TimeInForce.Gtc, numericStepperValue, 0, 0, string.Empty, "Entry", null);
account.Submit(new[] {entryOrder});
stopOrder = account.CreateOrder(instr, OrderAction.Sell, OrderType.StopMarket, TimeInForce.Gtc, numericStepperValue, 0, lowBar - TickSize, string.Empty, "Stop Loss", null);
account.Submit(new[] {stopOrder});
my output
ll:14758.25
ll:14758.25
ll:0
ll:0
ll:0
ll:0
Comment