Multiple trading criteria for open and close in one EA

Back to topics list To post a new topic, please log in or register
avatar
2
how2 2015.08.10 23:08
 

Hi,

I know it is possible to set more than one opening rule to open a trade with the use of multiple "if's", but how to assign a closing rule to each opening one?

Please, treat me like an amateur. I mean, some simple template would be welcome.

Thanks. 

avatar
Moderator
3418
GumRai 2015.08.11 00:38 #
 
how2:

Hi,

I know it is possible to set more than one opening rule to open a trade with the use of multiple "if's", but how to assign a closing rule to each opening one?

Please, treat me like an amateur. I mean, some simple template would be welcome.

Thanks. 

The one is referring to rule?

If you use different conditions ( as opposed to a combination of conditions) to open trades, you could use a different magic number for each condition

Then you can check the MN and you will know which condition was used to open the trade 

avatar
2
how2 2015.08.11 15:33 #
 
GumRai:

The one is referring to rule?

If you use different conditions ( as opposed to a combination of conditions) to open trades, you could use a different magic number for each condition

Then you can check the MN and you will know which condition was used to open the trade 

Magic Number did the job.

Thanks for your quick response.

Back to topics list  

To add comments, please log in or register