Forex



Go Back   Forex Trading > Downloads > Expert Advisors - Metatrader 4






Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 10-31-2008, 12:27 PM
cencurut's Avatar
Junior Member
 
Join Date: Oct 2007
Location: Liechstenstein
Posts: 7
cencurut is on a distinguished road
Smile StopLoss EA Coding Samples

Dear All,

Could anyone point out to me a sample for StopLoss coding. I'm planning to include it on my first EA product.

Thanks in advance.
__________________
FBOT EA | My Personal Blog
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 10-31-2008, 03:12 PM
Senior Member
 
Join Date: Nov 2006
Posts: 305
luxinterior is on a distinguished road
When you say 'product' do you mean you're going to attempt to sell it? And you don't know how to code a stoploss? No offense but if you can't program something as straightforward as that I can only imagine how good the quality of your 'product' will be.

Good luck

Lux
__________________
Build An Expert Advisor. FREE E-course As Seen On TV
ForexArea.com
Users of Gap Trader from 'Forex-Assistant' MUST Read This
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-01-2008, 12:45 AM
cockeyedcowboy's Avatar
Senior Member
 
Join Date: Nov 2005
Posts: 476
cockeyedcowboy is on a distinguished road
Quote:
Originally Posted by luxinterior View Post
When you say 'product' do you mean you're going to attempt to sell it? And you don't know how to code a stoploss? No offense but if you can't program something as straightforward as that I can only imagine how good the quality of your 'product' will be.

Good luck

Lux

Lux

Have you not discovered yet that it makes no difference if it works or not theres people out there that will pay big bucks for a good sales pitch. been thinging of selling some of my work too, only the stuff that doen't work. The good stuff I will keep to myself.
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-01-2008, 06:06 AM
Senior Member
 
Join Date: Nov 2006
Posts: 305
luxinterior is on a distinguished road
CC you're so jaded and cynical...I LIKE it! Just like me.

Lux
__________________
Build An Expert Advisor. FREE E-course As Seen On TV
ForexArea.com
Users of Gap Trader from 'Forex-Assistant' MUST Read This
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-01-2008, 07:17 AM
MANSTIR's Avatar
Senior Member
 
Join Date: Nov 2007
Posts: 162
MANSTIR is on a distinguished road
Quote:
Originally Posted by cencurut View Post
Dear All,

Could anyone point out to me a sample for StopLoss coding. I'm planning to include it on my first EA product.

Thanks in advance.
here some of coding example ;

extern double StopLoss = 0.0;

.....

....

double l_price_12;

..................
..................

if (StopLoss == 0) l_price_12 = 0;
else l_price_12 = NormalizeDouble(Ask - StopLoss * Point, Digits);
if (OrderSend(Symbol(), OP_BUY, LotsOptimized(), Ask, slippage, l_price_12, l_price_4, "M buy", Magic, 0, Blue) > -1) gi_180 = FALSE;
PlaySound("alert.wav");

.......
.......

best of luck,

MANSTIR
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
  #6 (permalink)  
Old 11-02-2008, 01:37 AM
cencurut's Avatar
Junior Member
 
Join Date: Oct 2007
Location: Liechstenstein
Posts: 7
cencurut is on a distinguished road
Okay ... maybe some of you might be cynical... but..

When I said it "a product", I didn't even said that I want to sell it. It just for my personal use only. For me, I don't believe that everyone should sell their EA even if it work for them. EA should always remains as personal as it should be.

EA should be use to test the system (back test) and it is not wisely to be use by a newbies (making money out of forex trading without any proper trading knowledge). I'm against the use of EA for newbies.

No offense to everybody, as I said earlier, EA should always be use to test the system (i.e backtest) and "scientific research and academic use only" and not for every Jack and Jane automatic trading usage.
__________________
FBOT EA | My Personal Blog
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
  #7 (permalink)  
Old 01-13-2009, 09:23 AM
Junior Member
 
Join Date: Apr 2008
Posts: 9
okranoblues is on a distinguished road
Thumbs up stop loss base on the next low

Can you please put an example of stop loss based on next higher low and next lower highs?

if is uptrend move the stop loss 10 pips below the next lower high for downtrend the opposite.


Thank you




Quote:
Originally Posted by MANSTIR View Post
here some of coding example ;

extern double StopLoss = 0.0;

.....

....

double l_price_12;

..................
..................

if (StopLoss == 0) l_price_12 = 0;
else l_price_12 = NormalizeDouble(Ask - StopLoss * Point, Digits);
if (OrderSend(Symbol(), OP_BUY, LotsOptimized(), Ask, slippage, l_price_12, l_price_4, "M buy", Magic, 0, Blue) > -1) gi_180 = FALSE;
PlaySound("alert.wav");

.......
.......

best of luck,

MANSTIR
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

Tags
stop loss ea, stoploss EA, forex EA coding, stop loss, ea stop loss

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
Automated Stoploss and Takeprofit Faultyboy Metatrader 4 14 07-16-2007 06:19 PM
Virtual StopLoss Flytox Metatrader 4 1 05-17-2007 02:43 AM
autotrade - stoploss sminic Metatrader 4 1 02-05-2007 11:05 AM
Variable Stoploss gkozlyk Expert Advisors - Metatrader 4 2 06-06-2006 01:34 PM


All times are GMT. The time now is 03:28 AM.



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