good bi attach TP, SL, trailing
Added.
Published code N- candles v2. Now + TakeProfit + StopLoss and + Trailing.
to : Vladimir Karputov
может помочь мне преодолеть это. так что EA можно добавить с прибылью. например, уже прибыль 10% или 20%, все транзакции, как покупка, так и продажа, могут устанавливаться с помощью TP и SL. спасибо за помощь мастера. Надеюсь, ты сможешь дать мне это решение.
для меня ваш советник очень хорош в борьбе с рынком с любым условием. единственное, чего нет, - это транзакция SL и TP jik. спасибо за помощь.
для меня ваш советник очень хорош в борьбе с рынком с любым условием. единственное, чего нет, - это транзакция SL и TP jik. спасибо за помощь.
для меня ваш советник очень хорош в борьбе с рынком с любым условием. единственное, чего нет, - это транзакция SL и TP jik. спасибо за помощь.
Look at the development of versions:
We look for N identical candles in a row. If the found candles bull — we buy if bear — we sell.
New in version 2: Take Profit, Stop Loss, Trailing.
Input parameters:
- N identical candles which go in a row
- Lot
- Take Profit (in pips)
- Stop Loss (in pips)
- Trailing Stop ("0" -> not trailing)
- Trailing Step (use if Trailing Stop >0)
- magic number
- slippage
Example of search, at N=3:

The Expert Advisor searches for N identical candlesticks in a row. It buys on bullish candlesticks and sells on bearish ones. The CPositionInfo, CTrade and CSymbolInfo classes are used in the code.
Version 1: N candles
Version 2: N- candles v2
New in version 3:
Inputs:
- N identical candles included in the desired series
- Lot
- Take Profit (pips)
- Stop Loss (pips)
- Trailing Stop ("0" -> not used)
- Trailing Step (used if trailing stop >0)
- Order magic
- Slippage
Example of search with N=3:

The Expert Advisor searches for N identical candlesticks in a row. It buys on bullish candlesticks and sells on bearish ones. The account type is taken into account, i.e. whether it is netting or hedging. The CPositionInfo, CTrade and CSymbolInfo classes are used in the code.
Version 1: N candles
Version 2: N- candles v2
Version 3: N-_Candles_v3:
New in version 4: on netting accounts, the "maximum position volume" parameter is used instead of "maximum number of items".
Inputs:
- N identical candles in a row
- Lot
- Take Profit (pips)
- Stop Loss (pips)
- Trailing Stop ("0" -> not used)
- Trailing Step (if trailing stop >0)
- Max positions certain direction (only for the hedging mode)
- Max position volume (only for the netting mode)
- Magic
- Slippage
An example of EA operation on a netting account:

Good morning, congratulations on the EA, it looks amazing.
How can I make the orders close when I see a candle that goes against the position?Good morning, congratulations on the EA, it looks amazing.
How can I get the orders to close when I see a candle opposite the position?1. this Expert Advisor does not work with pending orders
2. After creating this code, the MQL5 language changed - I think now this code will not be compiled.
1. this Expert Advisor does not work with pending orders
2. After creating this code, the MQL5 language changed - I guess now this code won't compile.
Good morning !
I want to develop an EA with the following characteristics:
Every time the next candle is bigger than the previous one it places a buy order, a sequence in this case.
The quantity should be changed according to the user, and the programme should close when the next candle is smaller than the previous one, reset the operations and continue trading:
Example
Buy 1 at price 10 reais
Buy 2 at price 20 reais
Buy 3 at price 30 reais.
In other words, it checks and buys if((Close[0]<Close[1])), otherwise it closes all positions if((Close[0]>Close[1])) and continues selling now until it reaches if((Close[0]>Close[1])) and so on.
In short, the programme should send buy and sell orders according to the candle. It should close the positions when it finds a reversal.
I'd like it to work with renko charts, can you help me? we can negotiate a price.
Good morning !
I'm looking to develop an EA with the following features:
Every time the next candle is bigger than the previous one, it places a buy order, a sequence in this case.
The quantity should be changed according to the user, and the programme should close when the next candle is smaller than the previous one, reset the operations and continue trading:
Example
Buy 1 at price 10 reais
Buy 2 at price 20 reais
Buy 3 at price 30 reais.
In other words, it checks and buys if((Close[0]<Close[1])), otherwise it closes all positions if((Close[0]>Close[1])) and continues selling now until it reaches if((Close[0]>Close[1])) and so on.
In short, the programme should send buy and sell orders according to the candle. It should close the positions when it finds a reversal.
I'd like it to work with renko charts, can you help me? we can negotiate a price.
Contact the Freelance service - maybe someone will rescue you.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
N candles:
The EA searches for N identical candlesticks in a row. If the found candlesticks are bullish, it buys. I they are bearish, the EA sells.
Author: Vladimir Karputov