Welcome to the Traders Laboratory Forums.
Automated Trading Black box systems, strategy automation, algorithmic trading, etc...

Reply
Old 09-08-2009, 06:30 PM   #1

Join Date: Jan 2009
Location: tiruchendur
Posts: 38
Ignore this user

Thanks: 51
Thanked 1 Time in 1 Post



EL Code Doubt

Hi guys please help me to code the following in easy language

I want to stop trading if my target for the day is achieved

or the loss(the maximum amount i like to lose in a day) for the day is achieved


Thanks
rajatheroyal is offline  
Reply With Quote
Old 09-08-2009, 06:46 PM   #2

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,588
Ignore this user

Thanks: 2,026
Thanked 1,402 Times in 862 Posts



Re: EL Code Doubt

have you tried coding it ???

this is similar in concept to your time question.


Code:
var:
profit.target(200);

if netprofit < profit.taget then begin
__________________


..........This is a terribly difficult question to answer. The only satisfactory answer is: "It depends"...
Tams is offline  
Reply With Quote
The Following User Says Thank You to Tams For This Useful Post:
rajatheroyal (09-08-2009)
Old 09-08-2009, 07:21 PM   #3

Join Date: Jan 2009
Location: tiruchendur
Posts: 38
Ignore this user

Thanks: 51
Thanked 1 Time in 1 Post



Re: EL Code Doubt

Quote:
Originally Posted by Tams »
have you tried coding it ???

this is similar in concept to your time question.


Code:
var:
profit.target(200);

if netprofit < profit.taget then begin
Thanks tams.I tried this,but this dint work coz this will take the total net profit and stop trading once the total net profit has reached in the strategy but i want only that day's profit to be considered.if theres any function like "net profit today" will work.
rajatheroyal is offline  
Reply With Quote
Old 09-08-2009, 07:23 PM   #4

Join Date: Jan 2009
Location: tiruchendur
Posts: 38
Ignore this user

Thanks: 51
Thanked 1 Time in 1 Post



Re: EL Code Doubt

BTW whenever any newbie asks questions u are the first to help him out thanks for being so kind Tams.
rajatheroyal is offline  
Reply With Quote
Old 09-08-2009, 08:31 PM   #5

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,588
Ignore this user

Thanks: 2,026
Thanked 1,402 Times in 862 Posts



Re: EL Code Doubt

Quote:
Originally Posted by rajatheroyal »
Thanks tams.I tried this,but this dint work coz this will take the total net profit and stop trading once the total net profit has reached in the strategy but i want only that day's profit to be considered.if theres any function like "net profit today" will work.

then you have to add a counter to keep track of your daily profits.

or reset the strategy every morning.

;-)
__________________


..........This is a terribly difficult question to answer. The only satisfactory answer is: "It depends"...
Tams is offline  
Reply With Quote
Old 09-08-2009, 08:32 PM   #6

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,588
Ignore this user

Thanks: 2,026
Thanked 1,402 Times in 862 Posts



Re: EL Code Doubt

Quote:
Originally Posted by rajatheroyal »
BTW whenever any newbie asks questions u are the first to help him out thanks for being so kind Tams.

I can answer questions, but I can't write the code for you,
...unless you make a US$500 contribution to this charity:
Room to Read
http://www.traderslaboratory.com/forums/charity/


.
__________________


..........This is a terribly difficult question to answer. The only satisfactory answer is: "It depends"...

Last edited by Tams; 09-08-2009 at 08:43 PM.
Tams is offline  
Reply With Quote
The Following User Says Thank You to Tams For This Useful Post:
rajatheroyal (09-09-2009)
Old 09-08-2009, 08:47 PM   #7

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,588
Ignore this user

Thanks: 2,026
Thanked 1,402 Times in 862 Posts



Re: EL Code Doubt

Quote:
Originally Posted by rajatheroyal »
Thanks tams.I tried this,but this dint work ...

next time tell us what you have tried... so that you don't waste people's time.
__________________


..........This is a terribly difficult question to answer. The only satisfactory answer is: "It depends"...
Tams is offline  
Reply With Quote
The Following User Says Thank You to Tams For This Useful Post:
rajatheroyal (09-09-2009)
Old 09-09-2009, 09:30 AM   #8

Join Date: Jan 2009
Location: tiruchendur
Posts: 38
Ignore this user

Thanks: 51
Thanked 1 Time in 1 Post



Re: EL Code Doubt

Thanks for the idea.I myself live in a developing country 500$ is a big sum in our country.My whole trading capital is just 8 times the donation u people pay for developing countries
i have not spent 500$ for my own education.
Just keep guiding like this no need to code for me .

Last edited by rajatheroyal; 09-09-2009 at 09:36 AM.
rajatheroyal is offline  
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
EL Code Doubt rajatheroyal Automated Trading 11 08-04-2009 07:40 PM
What EL Code Should I Use ? emptyvault Coding Forum 4 07-01-2009 11:08 AM
ADE Code karsat Coding Forum 0 03-08-2009 09:06 PM
P&F Code point-figure Coding Forum 0 02-17-2009 07:24 AM
Help To Code My EA pepe1 Coding Forum 0 06-24-2008 02:41 PM

All times are GMT -4. The time now is 03:55 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.