@@ -279,8 +279,11 @@ private void DrawStopText(IModel model)
279279 {
280280 if ( ! InputShowLineLabels )
281281 return ;
282+
283+ int precision = BotTools . CountDecimals ( Symbol . TickSize / Symbol . PipSize ) ;
284+ string formatSpecified = $ "F{ precision } ";
282285
283- StopLossText = Chart . DrawText ( StopLossTextTag , $ "{ GetStopDistancePips ( model ) : F1 } ", IndexFromXCoordinate , model . StopLoss . Price , InputStopLossLabelColor ) ;
286+ StopLossText = Chart . DrawText ( StopLossTextTag , $ "{ GetStopDistancePips ( model ) . ToString ( formatSpecified ) } ", IndexFromXCoordinate , model . StopLoss . Price , InputStopLossLabelColor ) ;
284287 StopLossText . IsHidden = model . HideLines ;
285288 StopLossText . FontSize = InputLabelsFontSize ;
286289 StopLossText . VerticalAlignment = VerticalAlignment . Bottom ;
@@ -352,7 +355,10 @@ public void DrawEntryText(IModel model)
352355 {
353356 if ( model . OrderType != OrderType . Instant )
354357 {
355- EntryText = Chart . DrawText ( EntryTextTag , $ "{ GetEntryDistancePips ( model ) : F1} ", IndexFromXCoordinate , model . EntryPrice , InputEntryLabelColor ) ;
358+ int precision = BotTools . CountDecimals ( Symbol . TickSize / Symbol . PipSize ) ;
359+ string formatSpecified = $ "F{ precision } ";
360+
361+ EntryText = Chart . DrawText ( EntryTextTag , $ "{ GetEntryDistancePips ( model ) . ToString ( formatSpecified ) } ", IndexFromXCoordinate , model . EntryPrice , InputEntryLabelColor ) ;
356362 EntryText . FontSize = InputLabelsFontSize ;
357363 EntryText . VerticalAlignment = VerticalAlignment . Bottom ;
358364 EntryText . HorizontalAlignment = HorizontalAlignment . Left ;
@@ -556,7 +562,10 @@ public void UpdateLines(IModel model)
556562
557563 if ( targetLine . TargetTextObj != null )
558564 {
559- targetLine . TargetTextObj = Chart . DrawText ( TargetLine . TargetTextTag + index , $ "{ GetTargetDistancePips ( model , index ) : F1} ", IndexFromXCoordinate , takeProfit . Price , InputTpLabelColor ) ;
565+ int precision = BotTools . CountDecimals ( Symbol . TickSize / Symbol . PipSize ) ;
566+ string formatSpecified = $ "F{ precision } ";
567+
568+ targetLine . TargetTextObj = Chart . DrawText ( TargetLine . TargetTextTag + index , $ "{ GetTargetDistancePips ( model , index ) . ToString ( formatSpecified ) } ", IndexFromXCoordinate , takeProfit . Price , InputTpLabelColor ) ;
560569 targetLine . TargetTextObj . FontSize = InputLabelsFontSize ;
561570 targetLine . TargetTextObj . IsHidden = model . HideLines ;
562571 targetLine . TargetTextObj . VerticalAlignment = VerticalAlignment . Bottom ;
@@ -621,7 +630,11 @@ public void UpdateLines(IModel model)
621630 if ( StopLossText != null )
622631 {
623632 StopLossText . Y = model . StopLoss . Price ;
624- StopLossText . Text = $ "{ GetStopDistancePips ( model ) : F1} ";
633+
634+ int precision = BotTools . CountDecimals ( Symbol . TickSize / Symbol . PipSize ) ;
635+ string formatSpecified = $ "F{ precision } ";
636+
637+ StopLossText . Text = $ "{ GetStopDistancePips ( model ) . ToString ( formatSpecified ) } ";
625638 }
626639
627640 if ( InputShowAdditionalStopLossLabel )
0 commit comments