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

Reply
Old 09-08-2009, 05: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, 05:46 PM   #2

Tams's Avatar

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

Thanks: 2,084
Thanked 1,474 Times in 912 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
__________________



Only an idiot would reply to a stupid post
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, 06: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, 06: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, 07:31 PM   #5

Tams's Avatar

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

Thanks: 2,084
Thanked 1,474 Times in 912 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.

;-)
__________________



Only an idiot would reply to a stupid post
Tams is offline  
Reply With Quote
Old 09-08-2009, 07:32 PM   #6

Tams's Avatar

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

Thanks: 2,084
Thanked 1,474 Times in 912 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/


.
__________________



Only an idiot would reply to a stupid post

Last edited by Tams; 09-08-2009 at 07: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, 07:47 PM   #7

Tams's Avatar

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

Thanks: 2,084
Thanked 1,474 Times in 912 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.
__________________



Only an idiot would reply to a stupid post
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, 08: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 08:36 AM.
rajatheroyal is offline  
Reply With Quote

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


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

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