• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 6:57pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 6:57pm
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

How to calculate forex position sizing / lot sizing 17 replies

MT4 plugin for simultaneous trade on friend's account? 1 reply

BUY run profit 1 lot, SELL LIMIT 2 LOT down again n BUY 1 lot - EA Reqd 5 replies

Help with Lot sizing 3 replies

IBFX Lot sizing 10 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 209
Attachments: MT4 Order Plugin: Trade by lines with risk based lot sizing
Exit Attachments

MT4 Order Plugin: Trade by lines with risk based lot sizing

  • Last Post
  •  
  • 1 3334Page 353637 65
  • 1 34Page 3536 65
  •  
  • Post #681
  • Quote
  • May 22, 2014 9:23am May 22, 2014 9:23am
  •  steve27
  • | Joined Feb 2014 | Status: Member | 34 Posts
its diffrent everytime
 
 
  • Post #682
  • Quote
  • May 23, 2014 1:41am May 23, 2014 1:41am
  •  sangmane
  • Joined Apr 2009 | Status: MT4 Programmer | 758 Posts
Quoting steve27
Disliked
Hi there, i mean for example when i select BUY it draws the blue TP line and the red SL line, but i need just the SL line :-) I have tried this it works so far, is that good? EasyOrder_Draw.mq4 string desc[3] = {"SL", "Price", "TP"}; color clr[3] = {Red, Gold, Blue}; double lines[3]; string desc[2] = {"SL", "Price"}; color clr[2] = {Red, Gold}; double lines[2]; The changes are in red (change 3 to 2 and delete TP and Blue) Is it possible to add comission or spread to the risk calculation?
Ignored
In EasyOrder_Draw:
Inserted Code
  
    //change i<3 to i<2
    for(i=0; i<2; i++) {
        obj = "EASYORDER_NEW_"+desc[i];
        if(ObjectFind(obj)>=0) ObjectDelete(obj);
        ObjectCreate(obj, OBJ_HLINE,0,Time[0],lines[i]);
        ObjectSet(obj,OBJPROP_WIDTH,2);
        ObjectSet(obj,OBJPROP_COLOR,clr[i]);
    }

In EasyOrder_Submit:
Inserted Code
        //set tp = 0
        double lot = alot[0];
        sl = NormalizeDouble(ObjectGet(obj+"SL",OBJPROP_PRICE1),Digits);
        tp = 0; //NormalizeDouble(ObjectGet(obj+"TP",OBJPROP_PRICE1),Digits);
        RefreshRates();
 
 
  • Post #683
  • Quote
  • May 23, 2014 2:48am May 23, 2014 2:48am
  •  steve27
  • | Joined Feb 2014 | Status: Member | 34 Posts
great thank you
 
 
  • Post #684
  • Quote
  • May 23, 2014 3:41am May 23, 2014 3:41am
  •  jago25_98
  • | Joined Sep 2013 | Status: Member | 45 Posts
Would be great to draw more complex lines; either diagonal or even along your favorite indicator predictions huh?
 
 
  • Post #685
  • Quote
  • Jun 5, 2014 1:06pm Jun 5, 2014 1:06pm
  •  Mardancar
  • | Joined Mar 2014 | Status: Junior Member | 2 Posts
Quoting obob
Disliked
I would like to suggest a useful feature. There are two ways of setting a bet: risk and lot. It would be great to be able to specified $ risk e.g. 20$ risk.
Ignored

Ok, I think too is a good idea,
 
 
  • Post #686
  • Quote
  • Jun 5, 2014 4:08pm Jun 5, 2014 4:08pm
  •  X-factor
  • | Joined Jan 2014 | Status: Junior Member | 1 Post
thank you very much for easyorder script.
 
 
  • Post #687
  • Quote
  • Edited at 4:43pm Jun 5, 2014 4:11pm | Edited at 4:43pm
  •  arashmidos
  • Joined Feb 2011 | Status: Member | 25 Posts
Hi Dear Sangmane
Thank you very much for easy order script.
I have a suggestion to modify this scrip.
Could you modify easy order that when we set stop loss to open new position, it set TP by a multiple of stop loss?
For example my position has 40 pips stop loss; I want to set 60 pips for target. Now it is comfortable for me to input multiple of 1.5 or other numbers to easy order and it set 60 pips for TP.
It is appreciated if you modify this nice script.
Thanks a Lot
Yahoo Id: arash_yashil
 
 
  • Post #688
  • Quote
  • Jun 25, 2014 2:40am Jun 25, 2014 2:40am
  •  Bruster400
  • | Joined Dec 2013 | Status: Member | 17 Posts
Hi Sangmane,

I've recently started using your script (7/2/14 version) but there's a serious problem. I've just tried to use it on a yen pair (CADJPY) and it opened an order 100 times bigger than it should have been. I've looked back and I've only used it so far on pairs with 4th decimal pips. Obvioulsly yen pairs are 2nd decimal pips and I'm guessing this is the problem.

Could you please confirm if it can tell the difference between the pip decimals and if not is there any chance of an update than can?

I can't believe it's been like this all the time so has anyone else had a similar problem?

Thanks.
 
 
  • Post #689
  • Quote
  • Jun 25, 2014 2:01pm Jun 25, 2014 2:01pm
  •  zoom2009
  • | Commercial Member | Joined Jun 2012 | 7 Posts
l 'm had been modified

1. Add Spread to Pending order
2. Add Spread to Risk MM
3. Modifed Risk turn to Money Value ($)
But !!!!! had cut Tp and Alert

Because l่'m Modified for ny high frequency trading system
you can add that from original.

Try!

Sorry for my English
Attached Files
File Type: mq4 EasyOrder.mq4   3 KB | 497 downloads
File Type: mq4 EasyOrder_Close.mq4   1 KB | 462 downloads
File Type: mq4 EasyOrder_Draw.mq4   2 KB | 458 downloads
File Type: mq4 EasyOrder_Submit.mq4   4 KB | 329 downloads
Forex market never sleeps
 
 
  • Post #690
  • Quote
  • Jun 26, 2014 12:03am Jun 26, 2014 12:03am
  •  zoom2009
  • | Commercial Member | Joined Jun 2012 | 7 Posts
Update Fix Some Bug
Attached File
File Type: mq4 EasyOrder_Submit.mq4   5 KB | 372 downloads
Forex market never sleeps
 
 
  • Post #691
  • Quote
  • Jun 26, 2014 4:37am Jun 26, 2014 4:37am
  •  chaveznqoos
  • Joined Jun 2006 | Status: Member | 478 Posts
Hi zoom2009;

My account is based on €, do I have to change something in the code for the correct calculation of risk in my currency?

Thanks
 
 
  • Post #692
  • Quote
  • Jun 26, 2014 6:14am Jun 26, 2014 6:14am
  •  zoom2009
  • | Commercial Member | Joined Jun 2012 | 7 Posts
Quoting chaveznqoos
Disliked
Hi zoom2009; My account is based on €, do I have to change something in the code for the correct calculation of risk in my currency? Thanks
Ignored
Don't Change anything
because l had code that to use for every currency.
Forex market never sleeps
 
 
  • Post #693
  • Quote
  • Jun 26, 2014 6:16am Jun 26, 2014 6:16am
  •  zoom2009
  • | Commercial Member | Joined Jun 2012 | 7 Posts
Work great on my system
Attached Image (click to enlarge)
Click to Enlarge

Name: 11.png
Size: 77 KB
Forex market never sleeps
 
 
  • Post #694
  • Quote
  • Jun 26, 2014 11:53am Jun 26, 2014 11:53am
  •  zoom2009
  • | Commercial Member | Joined Jun 2012 | 7 Posts
Update
Add Take Profit Risk Ratio (Calculator by Stoploss)

You can change on setting by metaeditor

//settings
int MagicNumber = 8051;
int Slippage = 2;
int USETP = 1; /// 1 =use 0 = false
int TPX = 2; /// Tp Risk Ratio 2 mean 2 x stoploss

Try!
Attached Image (click to enlarge)
Click to Enlarge

Name: 12.png
Size: 62 KB
Attached File
File Type: mq4 EasyOrder_Submit.mq4   5 KB | 471 downloads
Forex market never sleeps
 
 
  • Post #695
  • Quote
  • Jun 26, 2014 12:35pm Jun 26, 2014 12:35pm
  •  omid650
  • | Joined Aug 2006 | Status: Member | 9 Posts
Dear zoom2009
is possible to add partial close feature to script ?
 
 
  • Post #696
  • Quote
  • Jun 27, 2014 5:12am Jun 27, 2014 5:12am
  •  Krystyn
  • | Joined May 2013 | Status: Unlearning Crap | 82 Posts
Hello zoom2009
Now it places limit and stop orders but instead of risk based lot size it puts smallest possible lotsize. Market orders do not work and I get - uninit reason 0.
Use axe Luke...
 
 
  • Post #697
  • Quote
  • Edited at 4:26am Jul 3, 2014 1:07am | Edited at 4:26am
  •  Krystyn
  • | Joined May 2013 | Status: Unlearning Crap | 82 Posts
Question to sangmane
Of course first thank you for the script.

I have non dollar based account so I modified line 149 of EasyOrder_Submit
from
Inserted Code
risk = risk/100*balance;
to
Inserted Code
risk = risk/100*(balance/MarketInfo(Symbol(),MODE_TICKVALUE));

Now it calculates proper size of position in my account currency.

But I'm tinkerer and not sure if the modification won't have unwanted side effects. Can you approove it?
Use axe Luke...
 
 
  • Post #698
  • Quote
  • Jul 9, 2014 9:27am Jul 9, 2014 9:27am
  •  Xcellent
  • | Joined Mar 2012 | Status: Member | 3 Posts
Hi Sangmane, first of all, thank you so much for the great script, it definitely makes my life a lot easier when placing an order and adjusting SL and TP level, simply with your mouse.

However, I was wondering if the script is also able to generate and place diagonal trendlines for new order, SL, and TP?
 
 
  • Post #699
  • Quote
  • Jul 10, 2014 1:52pm Jul 10, 2014 1:52pm
  •  sangmane
  • Joined Apr 2009 | Status: MT4 Programmer | 758 Posts
Quoting Krystyn
Disliked
Question to sangmane Of course first thank you for the script. I have non dollar based account so I modified line 149 of EasyOrder_Submit from risk = risk/100*balance; to risk = risk/100*(balance/MarketInfo(Symbol(),MODE_TICKVALUE)); Now it calculates proper size of position in my account currency. But I'm tinkerer and not sure if the modification won't have unwanted side effects. Can you approove it?
Ignored
Hi,

Please use the attached EasyOrder_Submit.ex4. Use on demo first and double checked the lot calculation.

HTH,
sangmane
Attached File
File Type: ex4 EasyOrder_Submit.ex4   17 KB | 431 downloads
 
 
  • Post #700
  • Quote
  • Jul 10, 2014 1:56pm Jul 10, 2014 1:56pm
  •  sangmane
  • Joined Apr 2009 | Status: MT4 Programmer | 758 Posts
Quoting Xcellent
Disliked
Hi Sangmane, first of all, thank you so much for the great script, it definitely makes my life a lot easier when placing an order and adjusting SL and TP level, simply with your mouse. However, I was wondering if the script is also able to generate and place diagonal trendlines for new order, SL, and TP?
Ignored
Hi Xcellent,

Unfortunately EO is not coded for that. Try searching FF for EA Line Trader.

HTH,
sangmane
 
 
  • Platform Tech
  • /
  • MT4 Order Plugin: Trade by lines with risk based lot sizing
  • Reply to Thread
    • 1 3334Page 353637 65
    • 1 34Page 3536 65
2 traders viewing now
  • More
Top of Page
Forex Factory Blog Updated: Alerting All Members
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2022