molanis.com/forum - Tools for MetaTrader : The place to ask about the best expert advisor builder, expert advisor downloads, and expert advisor programming
http://www.molanis.com/forum/

how to create an EA satisfy following conditions
http://www.molanis.com/forum/viewtopic.php?f=6&t=6103
Page 1 of 2

Author:  kobayan616 [ Tue Jan 13, 2015 7:23 pm ]
Post subject:  how to create an EA satisfy following conditions

Thank you for activating!
Need a help in here, to create an EA by using Molanis strategy builder. Please help me out.

I want to have a position when moving averages are golden clossed.
And every time the golden cross is formed, keep making Long positions up to at most 4. Be settled to the position where terms of payment were complete at anytime.

ex)
Moving average; MA_5 period =5, MA_20 period=20
times; optional
lots; 0.1/ par a position
currency; EUR/USD
entry; MA_5 and MA_20 are golden crossed, have a long position (0.1 lot)
exit; 1) The profit beyond 100 pips. 2) The profit beyond 10pips when the MAs are dead crossed. 3) The loss is beyond -50 pips.
One of 1)-3) is formed.

A loss cut will be sometimes carried out immediately, but both immediately and a closing price will be fine for profit fixation.

Thank you for your help.

Author:  molanisfx [ Tue Jan 20, 2015 8:15 am ]
Post subject:  Re: how to create an EA satisfy following conditions

Take a look at the examples page at http://www.molanis.com/products/molanis ... rs-for-mt4 It has many ma examples
For the profit, you can only set one in the buy icon (set it to 100). You cannot do 100 or 10 pips depending on conditions out of the box. You can add that condition if you build a condition using the mql icon that checks the open price but it is not an easy task. Using the existing icons and no coding you can set it to 100 pips
Set max open positions to 4

Author:  kobayan616 [ Wed Jan 28, 2015 12:28 am ]
Post subject:  Re: how to create an EA satisfy following conditions

Thank you for your reply.

When I set max open positions to 4, 4 positions are made at one time.

I want to make 1 position every times when the conditions are satisfied, one by one and at most 4 positions.  How should it be done specifically?

Author:  molanisfx [ Wed Jan 28, 2015 2:49 pm ]
Post subject:  Re: how to create an EA satisfy following conditions

You need to control the number of positions. You need to call a function using the mql or mql+ icon
Check this example, it opens 2 positions, then another one, and it shows the number of opened postions

Attachments:
numerOfPositions.mol [12.63 KiB]
Downloaded 759 times

Author:  kobayan616 [ Thu Jan 29, 2015 5:25 am ]
Post subject:  Re: how to create an EA satisfy following conditions

Attached file couldn't be read :(
(Even if it opens, an snow-white screen is indicated. If other sample files will be downloaded and read on probation, it can normally open there.)


Which function is it concretely to call some functions to the above?

Author:  admin [ Thu Jan 29, 2015 9:53 pm ]
Post subject:  Re: how to create an EA satisfy following conditions

it is a file for the strategy builder
If you cannot get it use right click - save as

Author:  kobayan616 [ Sat Jan 31, 2015 9:32 pm ]
Post subject:  Re: how to create an EA satisfy following conditions

Yes, I can download the file though, the file keep showing the status reading a file and cannot be opened on the Molanis builder.

I tried to read & open other sample files, found on Molanis web site, they were possible to be compiled and simulated by MT4 strategy tester.

Author:  molanisfx [ Sun Feb 01, 2015 10:14 am ]
Post subject:  Re: how to create an EA satisfy following conditions

the problem is the way the browser downloads it. it is an xml file with extension .mol
Do not click it, use right click save as

Author:  kobayan616 [ Thu Feb 05, 2015 1:19 am ]
Post subject:  Re: how to create an EA satisfy following conditions

thanks for the above advices.
I checked the operation of the sample file,numerofpositions.mol,and have 2 questions to ask.

First, I changed the entry logic to MA golden cross. then, I examined two points.
1) or several times an entry in the demo trading also do that when become 0.5lot in total.
2) either the same operation as the one in the back test(MT4 starategy tester).


The results,
1, Demo trading) 3 times entry. First time, the second time 0.1 lot, the third time was 0.3 lot. All you wonder, that would have a long position I did not have golden cross in third.
the same can also try many times. -> I'd like to know why.

2, Back test) The first time 0.1lot holdings. Then, no position opened even golden cross occured. I can not back test on this condition. I'd like to know the countermeasure.

Author:  molanisfx [ Thu Feb 05, 2015 9:38 am ]
Post subject:  Re: how to create an EA satisfy following conditions

Unfortunately I do not understand your question. Can you parafrase it?
What is a MA golden cross for you? people have different definitions for that
When you said ocurred you mean long, short?
To get help I really need the .mol file and a screenshot showing the issues

Page 1 of 2 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/