i use it like this
[ If position ]=>[ Check position count ]=>[ Trailing (group) ]
and its works fine
Posts made by KLG
-
RE: Trail stop not working at allposted in Questions & Answers
-
RE: Trail stop not working at allposted in Questions & Answers
keep in mind that group trailing starts counting pips of (Trailing start) from the breakeven of the group PnL,
if you set trailing start [10pips] it will count 10 pips in profit of the total trades to trigger placing SL -
RE: View the S/L value of an oscillator on the price chartposted in Questions & Answers
@REALMENTORING I know there is a way to convert ATR score to a price value but i haven't work on it before
you can check the post below maybe you will come up with an idea from it
https://fxdreema.com/forum/topic/12802/atr-pips -
RE: Complete Optimization on multiple timeframesposted in Questions & Answers
@Hellzer you are welcome I'm glad that post helped you finde what you need : )
-
RE: AFTER EMA CROSSOVER AFTER TP HIT BOT AGAIN TRADE AT THE SAME PLACEposted in Questions & Answers
you need more conditions to act as you explained
-
RE: KELTNER CHANNELposted in Questions & Answers
you can share the indicator file here so we can help
-
RE: Complete Optimization on multiple timeframesposted in Questions & Answers
@Hellzer
Hello Hellzer,
check the post below you may fined what you need
http://fxdreema.com/forum/post/115802 -
RE: View the S/L value of an oscillator on the price chartposted in Questions & Answers
if you want to place a SL to show to the broker but you don't want it to be the main condition of closing the trade you can use the modify SL blocks to keep distance between the price line and the SL level ( there is 2 SL modify blocks in FXdreema)
1- you place a SL when the position is placed in a specified distance
if the buy position goes up the SL should stay on the original level until the trade is closed by the indicator "no SL modify is applied"2- if the price level is going down toward the SL line the SL modify block will keep a distance between the Price line and the SL level until the trade is closed by the indicator
-
RE: View the S/L value of an oscillator on the price chartposted in Questions & Answers
let me tell you what i understood from you,
momentum indicator candle crosses above 100 the previous candle => buy now
momentum indicator candle value is 99.49 => close positionif that is the only closing condition there will not be a SL based on a price level because the actual SL level is 99.49 of the indicator
-
RE: Help with eaposted in Questions & Answers
@lolomax said in Help with ea:
Price touches YesterdayHigh → wait for candle close below it → Sell
Price touches YesterdayLow → wait for candle close above it → Buy**-(Price touches YesterdayHigh/Low) is it the same candle that touched the level to be the one to close below/above ?
-if the price break above/below for a sum of candles then after closed below/above for one candle that will trigger a position opening ?**
-
RE: Question How to Implement Group Trail Stop From Average Weighted Priceposted in Questions & Answers
@thatguyisop Hello , this is my way of handling a group trailing SL and group SL,
I don't use ATR, I think you have to use custom indicator for it and also you have to convert the value of the ATR indicator to PIPS or points so you can be able to match the value with the symbol price.,the group SL formula is a must if you want the SL to be the same for the different positions
-
RE: Compile error occur . Pls help me how to fix.posted in Questions & Answers
@Kim98 Hello Kim , share a link of your project
-
RE: Error on the Block "No Trade Nearby" that doesn't find trades that are actually nearby...posted in Bug Reports
I just found out that The Global variables known in mql5 is The "Terminal variables" in FXDreeam , I managed to make use of it but not fully tested, i came across a problem that if i trade different symbols even with a different magic number the "gvar" interfere with the different symbol !, I'm not sure how to bond the terminal variables to the magic number/symbol
-
RE: Error on the Block "No Trade Nearby" that doesn't find trades that are actually nearby...posted in Bug Reports
I know there is a solution to have some information to be stored in the global variables to make it work but i tried everything i could and I'm still trying
-
RE: Error on the Block "No Trade Nearby" that doesn't find trades that are actually nearby...posted in Bug Reports
@l-andorrà The "No Trade Nearby" will effectively block any new trade withing the specified pips distance selected as long as the terminal is not closed,
once you close the terminal ( intentional or by accident ) all the number of trades in the grid will fill in rapidly !! ,
do you have any clue about this issue ?
I've been working around it in many ways but did not fined any solution@choppedice @TipsyWisdom @fxDreema @refaey @q8carpenter @jstap @roar
-
RE: MT5 Close All Fastposted in Questions & Answers
@jstap Thanks to you,
I think i found out how to make a group parameter for the custom block,
not tested yet but i think it will work,
-
RE: MT5 Close All Fastposted in Questions & Answers
@KLG
Final codes that follows the "Magic number" and the "Symbol" the EA started with and very fast execution for the benefit of the community ,///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
CloseAllPositions :-
**In the main area**
{
sTrade.SetAsyncMode(true); // Enable asynchronous trade operations
CloseAllPositions(); // Call function to close all positions
}~next~
**In Global variables, includes :**
#include <Trade/Trade.mqh>
CTrade sTrade;
**In the custom functions:**
void CloseAllPositions()
{
sTrade.SetAsyncMode(true);int total = PositionsTotal();
for (int i = total - 1; i >= 0; i--)
{
ulong ticket = PositionGetTicket(i);
if (ticket == 0) continue;string symbol = PositionGetString(POSITION_SYMBOL); long magic = (long)PositionGetInteger(POSITION_MAGIC); if (symbol == _Symbol && magic == MagicStart) { sTrade.PositionClose(ticket); }}
}///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
CloseBuyPositions
**In the main area**
{
sTrade.SetAsyncMode(true); // Enable asynchronous trade operations
CloseBuyPositions(); // Call function to close only buy positions
}~next~
**In Global variables, includes :**
#include <Trade/Trade.mqh>
CTrade sTrade;
**In the custom functions:**
void CloseBuyPositions()
{
sTrade.SetAsyncMode(true);int total = PositionsTotal();
for (int i = total - 1; i >= 0; i--)
{
ulong ticket = PositionGetTicket(i);
if (ticket == 0) continue;string symbol = PositionGetString(POSITION_SYMBOL); long magic = (long)PositionGetInteger(POSITION_MAGIC); int type = (int)PositionGetInteger(POSITION_TYPE); if (symbol == _Symbol && magic == MagicStart && type == POSITION_TYPE_BUY) { sTrade.PositionClose(ticket); }}
}///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
CloseSellPositions
**In the main area**
{
sTrade.SetAsyncMode(true); // Enable asynchronous trade operations
CloseSellPositions(); // Call function to close only sell positions
}
~next~
**In Global variables, includes :**
#include <Trade/Trade.mqh>
CTrade sTrade;
**In the custom functions:**
void CloseSellPositions()
{
sTrade.SetAsyncMode(true);int total = PositionsTotal();
for (int i = total - 1; i >= 0; i--)
{
ulong ticket = PositionGetTicket(i);
if (ticket == 0) continue;string symbol = PositionGetString(POSITION_SYMBOL); long magic = (long)PositionGetInteger(POSITION_MAGIC); int type = (int)PositionGetInteger(POSITION_TYPE); if (symbol == _Symbol && magic == MagicStart && type == POSITION_TYPE_SELL) { sTrade.PositionClose(ticket); }}
}///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
I would love to know how i can add a parameter to assign the blocks to specific group number like the normal blocks of FXdreema, if any one knows how please let me know.

-
RE: MT5 Close All Fastposted in Questions & Answers
@jstap i found this ( https://www.mql5.com/en/forum/116395 ) but I'm not a coding expert, do you know how i can use it with your code ?
-
RE: MT5 Close All Fastposted in Questions & Answers
@jstap but there is a problem , this code will close every thing regardless the "Magic number" and the "Symbol" !
is there a way i can make it specified ?