Entry, stop loss and take profit
-
how can i make stop loss of new orders to be at the stop loss of current running trade?
-
Hi, Any advice please.
- I want to enter trades once a candle has closed at a fib 38.2 level of the candle.
- I want to set my stop loss at 10 pips above the high of the wick when going short and 10 pips below the low of the wick when going long.
- I want my take profit to be twice the distance between my entry and my stop loss.
Can I do that in fxdreema? Any help appreciated.
Cheers!
-
Fibonacci is an object normally, some people use indicators as well. What do you use, or how do you know that level 38.2? And if this level is for a candle, is fibonacci really needed?
SL and TP are easy. Do you tried to do something at all? -
It doesn't have to be a precise fib 38.2, just something near it. 40% retrace would be near enough.
I have found For Each Object function and selected Fibonacci Retracement but don't understand what Z-A or A-Z means.
I have looked and can't find anything that allows me to set the stop loss and take profit where i want to place it. Can you tell me where these functions are.
I am totally new to EAs and know nothing about programming.
If you can tell me how to carry out these functions in fxdreema then I can my EA done.
Cheers -
SL and TP are initially set in the blocks where you create trades - Buy now and Sell now. They can be placed at some distance (or example 10 pips) or they can be placed at some other level - see Dynamic options. If SL and TP needs to be changed after that, then other blocks should be used.
Objects are identified by name in MT, that's why they are sorted by name. But I was not added functionality to create fancy objects like fibonacci, so "For each Object" can help if there is already created object.
Don't you want to just check if some part of the candle is ~40% of some other part of the same candle?
-
Hi, I have selected dynamic options in Buy Pending Order but it does not allow me to set stop loss at 10 pips above the previous candle nor a take profit for a risk reward of 1:2. In my system I don't change my SL and TP once they are set.
Regarding the 40% or fib 38.2, what i want to do is set my trade entry point at a fib 38.2 (or 40%, it doesn't matter) of the previous candle. The aim is to take advantage of the price retracement before it heads to my take profit target.
I have looked at various options in fxdreema and it doesn't seem to be available. Can you tell me exactly where to look and how to do it.
Thanks -
I don't know how a Buy pending order can have Open price in the middle of the previous candles and SL at 10 pips above the High of the same candle, but anyway...
http://fxdreema.com/shared/oSr7HQEnb
I used Variables here and some calculations to get 3 levels - open price, SL and TP. All calculations can be found in block 1. Blocks 2, 3 and 4 are used to plot those levels on the chart - Open price is brown, SL is red and TP is blue. But I guess some conditions are needed before placing new order - you probably need to check the type of the previous candle and it's size. There are 2 blocks that can probably help - "Bull candle" and "Bear candle", but if they can't help - "Condition" is over there.
-
Thanks for that. I used Single Candle Template to identify the shape of the previous candle. I hope that is correct.
When I try to create an EX4 file i get Compilation Errors: Pending - variable not defined; Order - variable not defined; Price - variable not defined; Stop - variable not defined; Loss - variable not defined. Can you help.
Also, once I have constructed my EA, is there ant way of checking if there are construction mistakes before it is loaded onto MetaTrader? -
Block 5 => "Pending Order Open Price" is not a valid variable name. You can right-click and select that variable if you prefer to see it that way.
In Variables you can specify human-friendly variable names, but because they are to be used in the code and there are rules about that, they are converted to look as variables. For example, empty spaces are not allowed, so they are just cleared. In Variables see on the right of your variable - there is the name that will be used inside the code. So I recomment to define variables in programming format - any latin letters, numbers and "_" is allowed and the variable name must not start with a number.
Construction mistakes... these errors are given by the compilator that MetaTrader uses. Well, not your MetaTrader, for the web version there is MetaTrader on the server, but this is the idea.
-
Thanks again. I've loaded the EX4 file onto metatrader and run the EA and got several messages in the journal along the lines of "test generator: unmatched data error (low value 1.36493 at 2013.12.19 00:00 is not reached from the least timeframe, low price 1.36514 mismatches)". On the Report tab there are 72 Mismatched chart errors. The modelling quality was 90%. What have I done wrong??
-
This is because MetaTrader... bad history data. I don't know why their history data is always corrupted, really always, there are holes of missing quotes and this is "normal".
-
Hi, I've downloaded Tickstory data for EURUSD and I think the backtester is using this data. I've used the moving average ea that came with the platform and that works OK but when i try my ea i get the unmatched data error message. I suspect it is my ea causing the problem because I have never made an ea before. Can you give me any further advice. what could be wrong with my ea that is causing this message or what else could i be doing wrong?
Thanks very much for all your help. -
This error comes from MT4, not from the EA. Unfortunately I don't know how to resolve it fully, but you can always search mql4.com for MT4 related topics.
-
You need to use variables to store the current SL value so that it can be used as a new SL value for the next trade.
-
@l-andorrà 7 years later man?! hahah
-
@jsauter86 Believe me there was a message from yesterday that has been removed!
I don't answer old threads for fun! 