MQL4 - automated forex trading   /  

Forum

Login | Register | Language: ru cn en
Have Something to Say to Traders? Welcome to Blogs!

Open/Close Trade For Candle

Back to topics list To post a new topic, please log in or register
avatar
9
zelda56789 2009.10.08 01:12
 
If I wanted to open/close a short/long trade using the below criteria, what methodes and/or stratagies would you recommend to me to accomplish following candles:

Tail is n % of total Hammer height - input=Minimum percentage of total Candle height represented by the Tail.

Long Trade, Open Candle:

Open – Low

------------- = n%
High – Low

Long Trade, Closed Candle:
Close – Low
-------------- = n%
High – Low

Short Trade, Open Candle:
High – Close
-------------- = n%
High – Low

Short Trade, Closed Candle:
High – Open
-------------- = n%
High – Low

Hammer is n pips in height (H to L) - input=Minimum height of candle in pips.

There is 'no cover' for preceding n bars - input=Number of pips that S/L will trail 2nd half of trade after each new high/low is made. ***If this is set to 0, both positions exit at Take Profit input.
Long trades: Tail low must be the lowest price for the preceding n bars. If a lower price was marked at any time during the prior n bars, the Long Hammer is disqualified and no trade is initiated.
Short trades: Tail high must be the highest price for the preceding n bars. If a higher price was marked at any time during the prior n bars, the Short Hammer is disqualified and no trade is initiated.

There must be an x pips move over n bars prior to Hammer (x pips move down for Long Hammer, x pips move up for Short Hammer) - input=Beginning time – sets the GMT hour that EA becomes active. Ending time – sets the GMT hour that EA becomes inactive (goes inactive at scheduled time if no trades are open; if trade is open, goes inactive as soon as trade is closed out by EA rules).
 
Inspired by the article about Neural Networks and made an EA based of that.
I'm working on a very complicated EA now it has Artificial Intelligence using a Neural Network with OpenCL and it's self-learning. On top of that it uses the MQL5 cloud to accelerate calculations, below is some more info on that: MQL5 Cloud Network Includes Thousands of Computers The MQL5 Cloud Network consists of nodes - dedicated servers, to which testing agents connect to perform tasks.
avatar
9
zelda56789 2009.10.08 18:22 #
 

My current code is attached and I know that some of it is not working right, but it is trading.

I could use some help getting the above criteria working properly.

Attached files:
  candles.mq4  (34.36 KB)
 
avatar
9
zelda56789 2009.10.08 21:28 #
 
Here is the document I am trying to make happen.
Back to topics list  

To add comments, please log in or register