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

AFTER YOU REGISTER SEND US AN EMAIL TO ACTIVATE YOUR ACCOUNT - Before posting:-1- Please read the user guide -2- Try the examples -3- Search in the forum
It is currently Wed May 15, 2024 8:25 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Lot Size Calculation
PostPosted: Mon Sep 03, 2012 7:43 am 
Offline

Joined: Thu Aug 23, 2012 2:00 pm
Posts: 49
Hi guy's...... please can someone help me....

I have developed an indicator that gives me a weighted number (ie. a value) that I would like to use to calculate my Lot size for each trade...

For eg. - I set my MM conditions to (whatever, risk, ratio, max lot size etc.) but then I would like to multiply this calculated lot size by the value of my custom indicator...

Can someone please point me in the right direction....


Top
 Profile  
 
 Post subject: Re: Lot Size Calculation
PostPosted: Mon Sep 03, 2012 10:28 am 
Offline

Joined: Sun Jun 19, 2011 9:38 pm
Posts: 270
I think you're trying to multiply apples and oranges... so to speak. The MM icon generates some built-in EA code while your custom indicator's code is self-contained within the indi file.

So... the TA block is not an option--MM is not an indicator.

Using iCustom to call your indi within an MQL block and mulltiplyiing it by MM is only an option if MM generates standard mql code. I'm guessing MM uses special Molanis code (not standard), but you may want to verify this in SB Pro.

So I see 2 options:

1. Build an indi that duplicates the desired calculation(s) performed by MM. Add your other custom indi code while you're in there, or simply call that indi using iCustom, and mutliply. Import the resulting indi into SB. Or...

2. From SB Pro, open the EA's mq4 and go to work hardcoding. Find the MM variables holding the specific value(s) you desire. Copy, paste, and edit the necessary code directly into your EA's trading conditons.

_________________
I'm not a programmer, but I play one on TV.


Top
 Profile  
 
 Post subject: Re: Lot Size Calculation
PostPosted: Tue Sep 04, 2012 3:03 am 
Offline

Joined: Thu Aug 23, 2012 2:00 pm
Posts: 49
Thanx RJo... those seem to be my only options.... I'll have to look at hard coding this.... thanx for confirming this


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by Molanis © 2009