Please explain me this.
  #1 (permalink)  
Old 09-16-2005, 07:59 PM
Ravique's Avatar
Super Moderator
 
Join Date: Sep 2004
Posts: 404
Thanks: 2
Thanked 1 Time in 1 Post
Ravique is a name known to allRavique is a name known to allRavique is a name known to allRavique is a name known to allRavique is a name known to allRavique is a name known to all
Send a message via Yahoo to Ravique
Question Please explain me this.

Here is what i ran onto on one forum, i would like some of the code understanding people expllain this to me, what is the buy criteria and what is the long criteria ?

Tha code :

if (h[1]+l[1]+o[1]+c[1])/4<(ask+bid)/2 and ask>open[0] then buy
if (h[1]+l[1]+o[1]+c[1])/4>(ask+bid)/2 and bid<open[0] then sell

__________________
Regards,
Ravique
Reply With Quote
  #2 (permalink)  
Old 09-16-2005, 10:57 PM
Sophomore
 
Join Date: Apr 2005
Posts: 50
Thanks: 0
Thanked 1 Time in 1 Post
sccz97 is a jewel in the roughsccz97 is a jewel in the roughsccz97 is a jewel in the roughsccz97 is a jewel in the rough
Default

Quote:
Originally Posted by Ravique
Here is what i ran onto on one forum, i would like some of the code understanding people expllain this to me, what is the buy criteria and what is the long criteria ?

Tha code :

if (h[1]+l[1]+o[1]+c[1])/4<(ask+bid)/2 and ask>open[0] then buy
if (h[1]+l[1]+o[1]+c[1])/4>(ask+bid)/2 and bid<open[0] then sell

the first line equates to: if the average price of the last candle is less than the current mid priceAND the current ask price is greater than the current open then buy

the second line equates to: if the average price of the last candle is greater than the current mid priceAND the current bid price is less than the current open then sell

use this logic at your own peril
Reply With Quote
  #3 (permalink)  
Old 09-16-2005, 11:27 PM
scorpion's Avatar
Administrator
 
Join Date: Aug 2004
Posts: 1,922
Thanks: 97
Thanked 361 Times in 147 Posts
scorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to behold
Send a message via MSN to scorpion Send a message via Yahoo to scorpion
Default

>> if (h[1]+l[1]+o[1]+c[1])/4<(ask+bid)/2 and ask>open[0] then buy

If (High + Low + Open + Close) / 4 of previous candle is less than the average of bid/ask price, and current ask price is higher than open price.


>> if (h[1]+l[1]+o[1]+c[1])/4>(ask+bid)/2 and bid<open[0] then sell

If (High + Low + Open + Close) / 4 of previous candle is higher than the average of bid/ask price, and current bid price is less than open price.
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
Reply With Quote
  #4 (permalink)  
Old 09-17-2005, 07:15 AM
Ravique's Avatar
Super Moderator
 
Join Date: Sep 2004
Posts: 404
Thanks: 2
Thanked 1 Time in 1 Post
Ravique is a name known to allRavique is a name known to allRavique is a name known to allRavique is a name known to allRavique is a name known to allRavique is a name known to all
Send a message via Yahoo to Ravique
Default

Thank s Scorpion
__________________
Regards,
Ravique
Reply With Quote
  #5 (permalink)  
Old 09-17-2005, 08:03 AM
scorpion's Avatar
Administrator
 
Join Date: Aug 2004
Posts: 1,922
Thanks: 97
Thanked 361 Times in 147 Posts
scorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to behold
Send a message via MSN to scorpion Send a message via Yahoo to scorpion
Default

You're welcome. But remember that above code is not equivalent in MQLII and MQL4, as the mt3 and mt4 bars formation is totally different. (if it's mql2 then use it in mql2 only, if it's mql4 then use it in mql4 only).
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
Reply With Quote
  #6 (permalink)  
Old 09-19-2005, 12:53 AM
Ravique's Avatar
Super Moderator
 
Join Date: Sep 2004
Posts: 404
Thanks: 2
Thanked 1 Time in 1 Post
Ravique is a name known to allRavique is a name known to allRavique is a name known to allRavique is a name known to allRavique is a name known to allRavique is a name known to all
Send a message via Yahoo to Ravique
Default

The OHLC Data remains the same for all the trading platform. And the bid + ask / 2 price - is a way to find a middle price.
Anyways, there are not so many rules to this, but the trade enter criteria is nice, can there be a MA with this kind of formula : (h[1]+l[1]+o[1]+c[1])/4 . This could end up beoing a nice system
__________________
Regards,
Ravique
Reply With Quote
  #7 (permalink)  
Old 09-19-2005, 02:23 AM
scorpion's Avatar
Administrator
 
Join Date: Aug 2004
Posts: 1,922
Thanks: 97
Thanked 361 Times in 147 Posts
scorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to beholdscorpion is a splendid one to behold
Send a message via MSN to scorpion Send a message via Yahoo to scorpion
Default

No, OHLC data varies in some platforms. OHLC in MT3 is completely different from that of MT4. In mt3, Bid and Ask prices are combined to generate OHLC, whereas in mt4, only bid is used to generate OHLC. Remember I asked how to Normalize is calculated?
__________________
Make easy pips with the Advanced Economic Calendar for Forex Trading.
Reply With Quote
  #8 (permalink)  
Old 09-19-2005, 03:52 AM
Ravique's Avatar
Super Moderator
 
Join Date: Sep 2004
Posts: 404
Thanks: 2
Thanked 1 Time in 1 Post
Ravique is a name known to allRavique is a name known to allRavique is a name known to allRavique is a name known to allRavique is a name known to allRavique is a name known to all
Send a message via Yahoo to Ravique
Default

Yeah, I do remember It.
__________________
Regards,
Ravique
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:12 PM.
Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0

Registered members have access to special online forex currency trading tools, software, mt4 expert advisors and indicators. Register now