hello , need help for how to buy only or sell only
-
hello
i want to tell ea on under certain condition is met , ea is set buy only. So the order will be buy , and not care any of sell condition.
also , how to check for example from top to bottom is how many daily candle counting ? and how to make that i want an action for x candle days incoming. for example .... if top to bottom is 5 candle days then i want to make an action EA wait for 10 days incoming day to act. Or we filter again with other indicator condition.
thx ....
i dont know where to find the topic , so i make a new post topic here.
-
I don't understand everything you say, but I can see that now you have some project like this:
No trade/Order exists -> If Buy order exists -> Sell now
When you don't have any trade and any order, there is no way that you can have buy order at the same time. So you get nothing, these blocks are exactly the opposite.
"AND" is not needed.
I don't understand what "top to bottom" means, but I have this feeling that you expect events to happen one after another from the top block to the bottom block. It's not that way, the event is "on Tick", those blocks are running on every tick: https://fxdreema.com/demo/mt4-wrong-closing-rule
-
for example if price touch the level of RSI > 85 , then EA is set to "buy only". ( EA will only look for the buying match condition , and ignoring the sell signal). This 'buying only' is will always be like that until sometime price touch the level of RSI < 15. The EA then will be in "Sell only".
Usually I do this manually set in the option. Hopefully if it can be automatically set.If I do the automatically set , can I change it in the middle of the run ? for example if EA is already set to buy only , can i manually set it to sell only ?
about top to bottom. I want EA to count from top to bottom in range like 8 candle days , or 12 candle days.
for example .... eurusd price bottom at 1.5000 and going to swing major top at 1.8000 . I need to count how many candle days from the swing bottom to swing top. Is it 15 candle days or how many candle days. I need to get that info. Then I will calculate that info for projecting the next reversal day. Something like that. I'm planning to make the swing top or bottom from the zig zag indicator. Or perhaps how many days from the oversold RSI come to overbought RSI.I want to make some reversal day EA with the management. But still dont know where from to start. Hopefully fxdreema can help
cheers
-
__
If I do the automatically set , can I change it in the middle of the run ? for example if EA is already set to buy only , can i manually set it to sell only ?
[/quote:3aoo7yl0]Try it.
__
about top to bottom. I want EA to count from top to bottom in range like 8 candle days , or 12 candle days.
for example .... eurusd price bottom at 1.5000 and going to swing major top at 1.8000 . I need to count how many candle days from the swing bottom to swing top. Is it 15 candle days or how many candle days. I need to get that info. Then I will calculate that info for projecting the next reversal day. Something like that. I'm planning to make the swing top or bottom from the zig zag indicator. Or perhaps how many days from the oversold RSI come to overbought RSI.
[/quote:3aoo7yl0]So you are searching for the ID numer of the candle where the last top/bottom was? I think this is a job for some indicator. If there is some object placed by the indicator on the place where the last top/bottom was, you can try something like this: https://fxdreema.com/shared/EjZVBNHcd
This is searching for the last arrow object with certain properties (red color) and then getting it's Candle ID and using it somewhere. -
hi there , need help
can you look my project named 2014 alfadream 3.0
block#29 and block#30 I think it will go wrong.
I want the trade of block#8 to be closed if block#19 OR block#2 condition met
I want the trade of block#9 to be closed if block#20 OR block#3 condition met
can you help me please ?can you also check that block#26 , 27 , 28 is on the right procedure ?
thanks
cheers
-
https://fxdreema.com/demo/applying-or-logic-method1
https://fxdreema.com/demo/mt4-or-logicYou don't need these "AND" blocks. Also, one of them is connected to itself, this will cause problems.
Now you have blocks like "Close trades" below block "No trade/order exists". If there is no trade, there is nothing to be closed!
I still think that you expect the top block to work first, then wait until the one below does it's job, then wait until those below.... It's not that way! Look at this example: https://fxdreema.com/demo/mt4-wrong-closing-rule It's a little bit different but it shows that idea and you MUST get this.
-
hi there
thanks for quick response
I did try fix it. can you look again , is it okay by now ?
-
I did backtest , and .... why the block#19 which should be only watch for the upper line , it also watch the lower line TMA. The same also happen with the block#20.
So ... when the candle is in the middle of the TMA band , it seems confuse wheter it is > upper line or < lower line.
-
sorry ... one more thing please
block#26 and block#27 ... on backtest , it seems move BEP stoploss before the RSI touch the level condition.
will you help me please .... thanks
-
It looks visually good now

But again, you have "No trade/order exists" on the top and below "If... exists". If some trade or order exists, blocks 10 and 14 will not be reached at all, because block 1 will not allow it.
You can have 2 separate chain of blocks - one for buys and one for sells. If this is the idea of course. So it will be like that:- No Sell trade exists -> Condition to Sell -> Close trades -> Sell
- No Buy trade exists -> Condition to Buy -> Close trades -> Buy
How to check conditions... I use "Draw arrow" most of the time. Place this one under some Condition and on the chart you will see tons of arrows on the place where the Condition is true. You can also check 26 and 27 this way.
To check values, like indicator buffer... and any other numeric value, use "Indicator tester" block like this: https://fxdreema.com/demo/mt4-indicator-tester
-
hai ...
thank you for your guide
it's nice nice now
I'm thinking about another money management. I'll be in touch when i need another help.
thank once again
-
Hi dreema ,
please look up my project , i'm trying to make a money management for my ea. Is the flow correct ?
I want it to be like this :
-
If buy at price 1000 --> put sell pending order at 850 --> if this sell order go , then put buy pending order at 1000. --> if this buy order go again (so now 2 buy from the start) ---> put sell pending order again at 850. If this sell order go , then put buy pending order at 1000 again. I want this to be max only like 5 buy steps and 5 sell steps.
-
if Sell ...... (almost like the above, just reverse)
will you help me please...
thank u
cheers
-
-
You have <If some trade exists> on every tick. This will not create pending orders by itself, because there is no trade initially. But even if you have some trade, it will start creating unlimited number of pending orders, because the trade is running and on every tick you create a new pending order.
So what you have is an endless loop which (fortunately) cannot start, but if it ever starts...
Try it in the opposite way, with "No whatever exists". In this way you create trade/order when it does not exists. And then, after it is created successfully - it will not pass the "No..." check again.
Also you can check the number of trades/orders if something like this is needed. "No..." is checking if 1 exists.
There is also "on Trade" event, but if you can do everything under "on Tick" it will be better. Because the Trade event is fired ONCE when something happen, while "No..." block is basically a condition that does not depend on events.