Skip to content

Commit

Permalink
1.075 Improved the "Deviation Martingale"
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonardoCiaccio committed Jun 25, 2022
1 parent 5642205 commit d526fb9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Binary file modified Extend cBot.algo
Binary file not shown.
8 changes: 4 additions & 4 deletions Extend cBot/Extend cBot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class ExtendcBot : Strategy

public const string NAME = "Extend cBot";

public const string VERSION = "1.074";
public const string VERSION = "1.075";

#endregion

Expand Down Expand Up @@ -469,10 +469,10 @@ private void OnClosePositions(PositionClosedEventArgs eventArgs)

TradeType reversed = (position.TradeType == TradeType.Sell) ? TradeType.Buy : TradeType.Sell;

double tmpSL = position.StopLoss == null ? 0 : Math.Abs(Math.Round(position.EntryPrice - (double)position.StopLoss, Symbol.Digits));
double stops = Math.Abs(position.Pips);

ExecuteMarketOrder(reversed, SymbolName, Symbol.QuantityToVolumeInUnits(Math.Round(position.Quantity * DMMultiplier, 2)), MyLabel, Symbol.DigitsToPips(tmpSL), Symbol.DigitsToPips(tmpSL));
Print("Open Martingala Deviation, consecutive loss {0}", ConsecutiveLoss);
ExecuteMarketOrder(reversed, SymbolName, Symbol.QuantityToVolumeInUnits(Math.Round(position.Quantity * DMMultiplier, 2)), MyLabel, stops, stops);
Print("Open Martingala Deviation, consecutive loss {0}, pips {1}", ConsecutiveLoss, stops);

}
else
Expand Down

0 comments on commit d526fb9

Please sign in to comment.