I have an condition and an similiar comment block on the red and the yellow output.
Maybe its because titles are different but if condition changes it leaves the old Comment and overwritres with new Comment and that looks ugly after a while.
I have an condition and an similiar comment block on the red and the yellow output.
Maybe its because titles are different but if condition changes it leaves the old Comment and overwritres with new Comment and that looks ugly after a while.
Threadopener: is it still relevant?
If your indicator is really worth to be used you ask me by private message for fixing the buffers or using some other "tricks" to read the arrows for use in an EA.
I very often check if a value is inside a channel.
I use a simple function:
bool isBetween(double needle, double border_a, double border_b, bool includingBorders = FALSE){
double temp;
if (border_a > border_b){
temp = border_b;
border_b = border_a;
border_a = temp;
}
if (includingBorders){
if ((border_a <= needle) && (needle <= border_b)) {return (TRUE);} else {return (FALSE);}
}
if ((border_a < needle) && (needle < border_b)) {return (TRUE);} else {return (FALSE);}
}
How to create a custom block from this?
If you could give a simple sample with some lines of comment how to create custom blocks would be really relly helpful.
** indicator moves within limits** is similiar but not doing the job
Hi folks,
lets try to convince Mr fxdreema to do us a favour and update the pretty old desktop version. We know he is not in deep love with it, but its still one of his babies and should not die allone in the dark.
All of you who feel like me, should vote for it! And maybe some kind words to beg for that are helpful too. 
Lets see how many of us would apprechiate having the desktop updated again, (or I will see its nobody except me
)
I vote for an update for the desktop version and I am sure I am not allone. 
I tried both and desktop works smother I can see the source and most guys like me want to keep our ideas on our own computers.
Please please please update the desktop frequently. Its ok not to have all updates but sometimes.
I wrote a small custom function for a common problem:
Often you want to know if a variable is changed since last tick or so.
Usually you start tricking around with myVal and myOldVal or something crappy. If it comes to a handful values you want to compare this way becomes ugly.
We need a short time memory and so I wrote this:
bool isChanged(int index, double value)
{
static double memory[];
if ((index +1) > ArraySize(memory)){
ArrayResize(memory, (index+1));
memory[index] = EMPTY_VALUE;
}
if (memory[index] != value){
memory[index] = value;
return (true);
}
return (false);
}
now you can use it like ```
isChanged(MY_INDEX, myJumpingValue)
it automagically stores and compares the value and returns true if the value is changed.
And I use constants for the indices because mql4 has no associative arrays like php -> you can not use a string as index.
To know if one of the values changed i can do something like this:
const CHANNEL_HIGH = 0;
const CHANNEL_LOW = 1;
const TRIGGER_HIGH = 2;
const TRIGGER_LOW = 3;
double hi, lo, thi, tlo;
// some code / blocks for setting the variables
if (isChanged(CHANNEL_HIGH, hi) || isChanged(CHANNEL_LOW, lo) || isChanged(TRIGGER_HIGH, thi) || isChanged(TRIGGER_LOW, tlo){
do_some_magic();
}
of course you can use the same in dreema's condition block.
leftValue Boolean true und in the adjust
&& isChanged(CHANNEL_HIGH, hi) || isChanged(CHANNEL_LOW, lo) || isChanged(TRIGGER_HIGH, thi) || isChanged(TRIGGER_LOW, tlo
Thats why I asked for the constants ;) But I understand your reasons and I will switch extern to const in my code before I compile the production version.
Hi I didn't get your question. But I am really curious which BO broker allows to use mt4 for trading.
If I understand your question right you should use two integer variables as counters initialized with zero and just always when you win add 1 to the win counter variable and the same for losses to the loss counter.
If you want to keep the value over restarts of the ea you can use terminal variables. Those you can share over several charts...
I prefer the desktop variant over the online variant as well.
Thess constants created in the constants tab arent really constants more that are extern's
there are two ways to define constants in mql4
const double foo = 13.8;
extern double bar = 42.7;
both create a not changeable constant but the second one could be modified by EA settings in the compiled version in Terminal
I use often constants as for eg array indizes or for writing better readable code like mql4 do itself with al enumerations and constants like OP_SELL OP_BUY among others
In mql4 i can write
const double foo = 42;
How can I do that in fxdreema?
Using Constants makes them "extern"
I am Using Comment Block to show a lot of information.
With next tick I write modified information but it overwrites the old comment and becomes unreadable.
Is there a way to wipe out old messages?
I want to trigger some tasks when a pending order is opened, I emntion when it changes from pending order to trade.
The onTrade Event is not helpful because it triggers also on placing the pending order.
What is the right block to filter for only running trades instead of running and pending?
Thanks a lot for any advise
2016.05.04 11:44:33.032 '27458': modify order #1352072 sell 0.38 EURUSD at 1.14879 sl: 1.14971 tp: 0.00000 -> sl: 1.14967 tp: 0.00000
2016.05.04 11:44:33.185 '27458': modify order #1352072 sell 0.38 EURUSD at 1.14879 sl: 1.14967 tp: 0.00000 -> sl: 1.15001 tp: 0.00000
2016.05.04 11:44:33.323 '27458': modify order #1352072 sell 0.38 EURUSD at 1.14879 sl: 1.15001 tp: 0.00000 -> sl: 1.14965 tp: 0.00000
2016.05.04 11:44:33.780 '27458': modify order #1352072 sell 0.38 EURUSD at 1.14879 sl: 1.14965 tp: 0.00000 -> sl: 1.14967 tp: 0.00000
2016.05.04 11:44:33.946 '27458': modify order #1352072 sell 0.38 EURUSD at 1.14879 sl: 1.14967 tp: 0.00000 -> sl: 1.14963 tp: 0.00000
2016.05.04 11:44:35.310 '27458': modify order #1352072 sell 0.38 EURUSD at 1.14879 sl: 1.14963 tp: 0.00000 -> sl: 1.14969 tp: 0.00000
2016.05.04 11:44:38.514 '27458': modify order #1352072 sell 0.38 EURUSD at 1.14879 sl: 1.14969 tp: 0.00000 -> sl: 1.14967 tp: 0.00000
Its a running sell trade and the SL is moved up and down
Ok now I understand this setting but why is the SL (on a buy trade) moving up and down with almost every tick? As I understand SL it should move ONLY up on BUY trades and only down on SELL trades.
I think thats an issue
Hmm i use the trailing stop block and the main problem is that it moves the SL up and down. But as I understand trailing it should only move it in one direction.
For buys only up and for sells only down. I use these settings:
Market mode Specified markets
Filter Buys and Sells
Trail what Stop-Loss
Refernced Price Ask for buy Bid for sell
Trailing Stop is Pips
Pips (a variable with default) 6
trailing step is Pips
Pips 1
Trailing start is open price
opposite stop mode no change (i do not understand this setting)
Level color DeepPink
I sometimes use the virtual stops feature but this isnt changing the behavior...
As written above it moves the SL up and down how to fix it
I do it like in your demo but SL sended to the broker is moving up and down and up and down.
But it should (assuming a buy trade) follow the price with some distance and never go down when it reached a specific level.
Thats how I understand SL.
It fires tons of modifies to the broker but as I said up and down while my buy trade is running...
What am I doing wrong?
(I am working at the desktop version)
I found your screenshots where to put the #include <...>
But please could you show a screenshot of a pretty simple custom block?
A simple sample dummy block, to put somewhere, just to have the includes.
The Studio is not realy selfexplaining and it would be helpful not only for me
I need to use some userdefined functions and it would be great to have a block or any other way to include a mqh file
Is that possible or do i have to edit the generated mql4 code?
Maybe a field for userdefined includes could go to project options
I emailed to you....
I have almost the same problem. OrderCloseTime returns an unix Time Stamp. To compare this time later on with the current server time we need to convert wether the close time in a dateTime or the dateTime in a unix ts.
Is there any blΓΆock for that?
Not clearly explained 
Which varname should be written there?
So its not in Desktop Version?
OK,I changed my PHP Code toreturn a single Number as workaround but i didnt get this number into a double variable.
Its because HttpResponseText is a string.
Where in the blocks can i do the StrToDouble to use the Number for Calculations?