no problem, do you know a workaround to accomplish this task (to close trade when current candle changes direction by a certain amount, say current tick >= previous tick):
Maybe there is a way to express "if current candle size decreases by x amount" or "if ask price crosses opening price, set virtual s/l at opening price" or simply "if candle changes direction"?
Posts made by Trader3487
-
RE: EA For USDJPYposted in Questions & Answers
-
RE: EA For USDJPYposted in Questions & Answers
Are tick ids function the same way as candle ids ex. where tick[0] the current tick and tick[1] is the previous tick?
This ea is supposed to close trades that are less than $0.10 profitable by using a trades loop to find any open trades whose direction has reversed within the current candle (i.e. whose ask price of tick[0] is greater than but not equal to ask price of tick[1]) but it's not working: http://fxdreema.com/shared/deukmspob
here's the same idea written differently (revised from an earlier forum post) but it also doesn't work: http://fxdreema.com/shared/2bVa6mgN
Thank you

-
RE: "Every n bars" block removedposted in Questions & Answers
I saw in the November update post that some bars were removed. Why was "Every n bars" removed? This was useful.
-
RE: Awesome Oscillatorposted in Questions & Answers
__This will execute block 1 first, then 2, then 3, 4, 5, 6, 7, 8, 9, 10: http://fxdreema.com/shared/UAhPkCTub
[/quote:2wwfoop9]In what order will these blocks execute?: http://fxdreema.com/shared/XbYGw0Ghd
-
RE: Awesome Oscillatorposted in Questions & Answers
but aren't IDs disregarded if they are connected to other blocks? Otherwise, what explains that above ea is working from the top to the bottom?
__Maybe it's better to have an option to normalize IDs concidering their location, so the user will see the result of this immediately and will still be able to position blocks anywhere.[/quote:18lpglyp]
great idea. Or maybe to auto-arrange blocks from top to bottom (or according to different layout templates that user can select/upload) on the page based on block ids.
Maybe the block IDs grow when you copy and paste a large number of blocks from a different project?
-
RE: Awesome Oscillatorposted in Questions & Answers
thanks for that info. on Awesome.mq4 - I'll check it out

I wrote this ea (screenshot attached) assuming that blocks were read from top to bottom. Strangely, it seems to work as expected. Are the block numbers ignored if they are connected to blocks above them (ex. block #2 is located physically below #1206157 (before normalization) but they are connected)?
I was wondering what role block numbers had so thanks for the clarification. Having structured this ea with location in mind, I think location is a good option since it helps organize things visually. I think execution by block number should stay an option since building ea this way would take less time. Maybe there could be 2 "modes" to build ea - by location or by number.
......
EA Execution Order.png -
RE: Awesome Oscillatorposted in Questions & Answers
I read that Awesome Oscillator = ma5 - ma34 so I was trying to recreate it... because I haven't figured out how to draw an arrow as soon as Awesome Oscillator changes direction (in current bar)...
I thought blocks were executed from top to bottom?! Does the number priority also apply to connected blocks, for example in an ea if block 10 is at top and block 9 is connected underneath, it will execute block 9 nevertheless? And what if you have parallel sets of blocks side by side (for example two separate conditions with a series of blocks connected after each condition but the 2 conditions are independent of each other and not connected to anything above) that you want to run at the same time but the numbers of the set on the left side come before those on the right - will it run the set on the left side first and then come back up and run the set on the right?
-
RE: Awesome Oscillatorposted in Questions & Answers
__This function gets the value from Awesome indicator: http://docs.mql4.com/indicators/iao It's pretty simple, no indicator parameters at all.[/quote:2kvbnaok]
So isn't this the same as the ea you wrote using condition blocks?
-
RE: Awesome Oscillatorposted in Questions & Answers
what about this to detect the color change? http://fxdreema.com/shared/CYZhCBB2b
(It's not working correctly) -
RE: Awesome Oscillatorposted in Questions & Answers
I found this post but not sure if the information can be incorporated into a custom block: http://www.metatrader4.com/forum/1202
-
RE: Awesome Oscillatorposted in Questions & Answers
that works except that it detects color change one bar too late but if you set candle ids to 0 & 1 in the first condition blocks, it doesn't work. "Indicator changes direction" block is a good idea but in the meantime, maybe there is a way to detect oscillator properties (i.e. color)? Thanks

-
RE: Awesome Oscillatorposted in Questions & Answers
Is there a way to write an ea that creates an alert message every time the awesome oscillator changes color (from red to green or green to red) using the awesome oscillator indicator or would I need to use more basic indicators like moving averages?
Thank you

-
RE: Testing "Start Trades Loop"posted in Questions & Answers
I see. How about:
"Load trades (pre-Loop)"
"Initialize trades (pre-Loop)" or just "Intialize trades"
"Load trades (prepare loop)" or just "Prepare loop"? -
RE: Testing "Start Trades Loop"posted in Questions & Answers
awesome! I just switched the connector coming off of "Start trades loop" from the orange to the yellow and ea is now executing correctly!!
-
RE: Testing "Start Trades Loop"posted in Questions & Answers
"Start trades loop" is fine now that I have better understanding of what it does so updating the description would suffice. "Initialize Trades Loop" could also work

-
RE: Testing "Start Trades Loop"posted in Questions & Answers
thanks for the response!
re: 1)
is there ever a case when orange and yellow outputs mean true and false (if true -> orange, if false -> yellow)?re: 2)
if group mode is set to "All (automated and manually opened), doesn't that mean all open orders?
are condition blocks 9 & 10 ok after the start trades loop since they are accessing order attributes? -
RE: Testing "Start Trades Loop"posted in Questions & Answers
Can "Start trades loop" and "in loop" be tested in mt4 backtester (in this example tested on 5-point symbol like AUDUSD)? It seems like it is not recognizing orders that are opened by ea because:
-
it is giving different results for the following 2 examples which are actually the same ea written differently:
http://fxdreema.com/shared/oajoGFX6d
http://fxdreema.com/shared/SoZGpXegc -
it is ignoring the logic within the ea which says, if current market value (candle close[0]) is within 0.001 distance of any open order, then do not open new order but as you can see it is opening new orders within the no open zone.
Maybe this can only be tested in the live setting or is there a flaw with the ea?
Thanks

-
-
RE: MQL4 Studio Working?posted in Bug Reports
The save changes button in http://fxdreema.com/studio/MQL4 isn't working (I tried it in chrome as well as firefox). Also, when I click the add new block button, the title disappears.
Thank you

-
RE: Check Trades Position Block?posted in Questions & Answers
well, turns out that last example works if there is a single order but doesn't work for multiple orders... I've tried every possibility over the last 4 hours and still can't figure it out

http://fxdreema.com/shared/HlLY20Kpb