Alamgir Malek
- #1,493
- Aug 20, 2023 12:50pm Aug 20, 2023 12:50pm
- Joined Dec 2015 | Status: Trader | 2,586 Posts
Perfection is the enemy of good enough!
Trying scalping with a 1000 bucks - Scalping is expensive! 39 replies
Trendline Scalping System Renko DAX 10 replies
1M & 5M Scalping System (Scalping Paradise) 21 replies
Trendline, Trendline and Trendline 4 replies
Blackdiamond System - Awesome scalping system (Coding Reqd) 9 replies
Disliked{quote} Hi william, Thanks for active again. I'm happy to see that the system works till now. Can you share the Breakout EDGE Scanner indicator?Ignored
Disliked{quote} What is here the clear rule for that trendline? For me I can not see that line you post at that place. Trade is working that is not the point. Can you define a routine for drawing your lines? Thanks.Ignored
void CalculateTradeParameters() {
double grid_range = NormalizeDouble(MarketInfo(Symbol(), MODE_BID) * GridPercentage / 100 / 10 * 100 * _Point, Digits);
double start_sell_price = MarketInfo(Symbol(), MODE_BID);
double start_buy_price = MarketInfo(Symbol(), MODE_ASK);
S1 = NormalizeDouble(start_sell_price + 1 * grid_range * _Point * 100, Digits);
S2 = NormalizeDouble(start_sell_price + 2 * grid_range * _Point * 100, Digits);
TP_S1 = NormalizeDouble(start_sell_price + (1 - 1) * grid_range*0.99 * _Point * 100, Digits);
TP_S2 = NormalizeDouble(start_sell_price + (2 - 1) * grid_range*0.99 * _Point * 100, Digits);
B1 = NormalizeDouble(start_buy_price - 1 * grid_range * _Point * 100, Digits);
B2 = NormalizeDouble(start_buy_price - 2 * grid_range * _Point * 100, Digits);
TP_B1 = NormalizeDouble(start_buy_price - (1 - 1) * grid_range*1.01 * _Point * 100, Digits);
TP_B2 = NormalizeDouble(start_buy_price - (2 - 1) * grid_range*1.01 * _Point * 100, Digits); void PlaceTradeOrders() {
stopLevel = NormalizeDouble(MarketInfo(_Symbol, MODE_STOPLEVEL) * Point, Digits);
if (signal=="start") {
// Place Buy Orders
if (!DoesOrderExistWithComment("B1")) {
RefreshRates();
if (TP_B1-B1<=stopLevel)
OrderSend(_Symbol, OP_BUYLIMIT, 1*Lots, B1, slippage, 0, TP_B1 + stopLevel, "B1", MagicNumber, 0, Red);
else OrderSend(_Symbol, OP_BUYLIMIT, 1*Lots, B1, slippage, 0, TP_B1, "B1", MagicNumber, 0, Red);
}
if (!DoesOrderExistWithComment("B2")) {
RefreshRates();
if (TP_B2-B2<=stopLevel)
OrderSend(_Symbol, OP_BUYLIMIT, 2*Lots, B2, slippage, 0, TP_B2 + stopLevel, "B2", MagicNumber, 0, Red);
else OrderSend(_Symbol, OP_BUYLIMIT, 2*Lots, B2, slippage, 0, TP_B2, "B2", MagicNumber, 0, Red);
}
if (signal=="start" ) {
// Place Sell Orders
if (!DoesOrderExistWithComment("S1")) {
RefreshRates();
if (S1-TP_S1<=stopLevel)
OrderSend(_Symbol, OP_SELLLIMIT, 1*Lots, S1, slippage, 0, TP_S1 - stopLevel, "S1", MagicNumber, 0, Blue);
else OrderSend(_Symbol, OP_SELLLIMIT, 1*Lots, S1, slippage, 0, TP_S1, "S1", MagicNumber, 0, Blue);
}
if (!DoesOrderExistWithComment("S2")) { RefreshRates();
if (S2-TP_S2<=stopLevel)
OrderSend(_Symbol, OP_SELLLIMIT, 2*Lots, S2, slippage, 0, TP_S2 - stopLevel, "S2", MagicNumber, 0, Blue);
else OrderSend(_Symbol, OP_SELLLIMIT, 2*Lots, S2, slippage, 0, TP_S2, "S2", MagicNumber, 0, Blue);
}