anyone know mq4 and feel like helping me?

If you don't know where to start, start here! Don't be afraid to ask questions.

Moderator: moderators

jimmynz
rank: <50 posts
rank: <50 posts
Posts: 8
Joined: Thu Jul 16, 2009 10:52 am
Reputation: 0
Gender: None specified

anyone know mq4 and feel like helping me?

Postby jimmynz » Fri Jul 17, 2009 6:51 am

i just need a bit of code added to my ea for money management.

i want to take my available balance x it by a % of my bank and / by the Stop loss.

eg:
Bank $1000 * 2% = $20 (risk)
/ 50 pips SL = .40c per pip (4 micro lots)

(checking the bank prior to a trade)

user inputs= % risk and SL
i trade micro lots.

thanks heaps
Last edited by jimmynz on Sat Jul 18, 2009 12:45 am, edited 1 time in total.

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

User avatar
blubbb
rank: 150+ posts
rank: 150+ posts
Posts: 219
Joined: Mon Sep 29, 2008 8:07 pm
Reputation: 0
Location: Europe
Gender: Male

Postby blubbb » Fri Jul 17, 2009 4:00 pm

You mean the problem that 1 pip rise in EURUSD gives another percentage as 1 pip rise in GBPJPY?

Had this problem in one of my EAs and the calculation of lots would be:

AccountBalance() * Risk / 100 / MarketInfo(Symbol(), MODE_TICKVALUE) / StopLoss

Risk in %
StopLoss in pips

jimmynz
rank: <50 posts
rank: <50 posts
Posts: 8
Joined: Thu Jul 16, 2009 10:52 am
Reputation: 0
Gender: None specified

Postby jimmynz » Sat Jul 18, 2009 12:13 am

hey good thought. i didn't think of this...
i normally trade the 1 pip = $1 pairs, but should i change to the nonequivalent pairs, id be stooped.

i get all except the "/100" part, could you explain it to me?
also, is there an easy way/place to drop this into my code?

jimmynz
rank: <50 posts
rank: <50 posts
Posts: 8
Joined: Thu Jul 16, 2009 10:52 am
Reputation: 0
Gender: None specified

Postby jimmynz » Sat Jul 18, 2009 12:43 am

dont worry solved it.
thanks to "smjones"

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.


Return to “beginners forum”