Forex



Go Back   Forex Trading > Discussion Areas > Metatrader 4
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 10-31-2006, 11:49 PM
ycomp's Avatar
Member
 
Join Date: Jan 2006
Posts: 93
ycomp is on a distinguished road
Script: Count your net positions in MT4 for a symbol

//+------------------------------------------------------------------+
//| #count_net_positions.mq4 |
//| Copyright © 2006, ycomp|
//| |
//+------------------------------------------------------------------+
//| - Counts the net positions for the Symbol on which the script |
//| was dropped. |
//+------------------------------------------------------------------+

//+------------------------------------------------------------------+
//| USAGE |
//+------------------------------------------------------------------+
// 1) Drop script on chart of symbol to count net positions for
//+------------------------------------------------------------------+


script attached in later message

Last edited by ycomp; 11-10-2006 at 06:36 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #2 (permalink)  
Old 11-01-2006, 08:55 PM
ycomp's Avatar
Member
 
Join Date: Jan 2006
Posts: 93
ycomp is on a distinguished road
anyone find it useful?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #3 (permalink)  
Old 11-02-2006, 12:31 AM
Senior Member
 
Join Date: May 2006
Posts: 156
waltini is on a distinguished road
Yes, me!

Thanks ycomp, I have downloaded it and though it is not perfect for my application I intend to add to it for my own use(hope you don't mind).

I can do simple coding at best so I need ideas how to implement my projects.

I am doing some swap hedge trading so I want to know the lots for different currencies and the ratio of one currency lots to another currency lots.

I have not seen "info(....." used before. I am going to try changing that to
comment so it remains on the chart.

thanks very much!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #4 (permalink)  
Old 11-02-2006, 12:42 AM
ycomp's Avatar
Member
 
Join Date: Jan 2006
Posts: 93
ycomp is on a distinguished road
sure go ahead and modify it for your own purposes.

the info() was just to encapsulate the messagebox call. Just in case I needed to use it more than once. (which I didn't Also makes the code more readable.

you can remove the:

bool moreOrdersForSymbol = true; // THIS DOES ABSOLUTELY NOTHING

this is what happens when you write something too hastily, you get sloppy

sounds like you should make this into an indicator if you want a Comment that updates all the time.

Last edited by ycomp; 11-02-2006 at 03:09 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #5 (permalink)  
Old 11-10-2006, 04:23 PM
ycomp's Avatar
Member
 
Join Date: Jan 2006
Posts: 93
ycomp is on a distinguished road
v1.10: Sums swap as well

Sum swaps as well for all positions of the chart symbol.
Attached Files
File Type: mq4 #count_net_positions.mq4 (2.8 KB, 25 views)

Last edited by ycomp; 11-10-2006 at 04:25 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MA what not count in the asian session bars lacika Setup Questions 0 11-22-2006 03:32 PM
How print a journal by symbol ? Jovager Expert Advisors - Metatrader 4 0 11-12-2006 11:13 AM
How to add symbol ? mastri Metatrader 4 1 10-05-2006 04:22 PM


All times are GMT. The time now is 10:34 PM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.