| Automated Trading Black box systems, strategy automation, algorithmic trading, etc... |
![]() | | Tweet | |
| | #1 | ||
![]() | Easy Language Strategy Help I've tried using the SetStopLoss and SetProfitTarget, but they continue to trade again after they have been triggered. They don't stop for the rest of the day. There is code in the TS forums, but it is several years old and I can't get it to work. I'm not sure if it is because the coding has been updated and its no longer compatible. Any help would be greatly appreciate. | ||
| |
|
| | #2 | ||
![]() | Re: Easy Language Strategy Help entriestoday(date)<1; can add it as a condition like this: condition1=entriestoday(d ate)<1; if condition1 then buy next bar at market; or just add it in to the buy command statement ------ to add anything added to inputs, you need to simply declare that you want then and then define it with a default number. ie, inputs: stopout (350); setstoploss(stopout); ---- good luck | ||
| |
|
| | #3 | ||
![]() | Re: Easy Language Strategy Help | ||
| |
|
| | #4 | ||
![]() | Re: Easy Language Strategy Help Code: inputs:DayProfitlimit(500),DayLossLimit(200)
variables:
canTrade(0),
NP( 0 ),
OPP( 0 ),
PLB4Today( 0 ),
ProfToday( 0 ) ;
NP = NetProfit ;
OPP = OpenPositionProfit ;
if date <> date[1] then begin
PLB4Today = NP[1] + OPP[1];
CanTrade=1;
end;
ProfToday = NP + OPP - PLB4Today ;
if ProfToday >= DayProfitlimit or ProfToday <= -DayLossLimit then Begin
cantrade = 0;
end;
// In your trades, check 'Cantrade' before trading.. | ||
| |
|
| The Following User Says Thank You to MseTrap For This Useful Post: | ||
FranckT (07-07-2011) | ||
![]() |
| Thread Tools | |
| Display Modes | Help Others By Rating This Thread |
| |
| ∧ Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| List of Easy Language Reserved Words | trbates | Beginners Forum | 15 | 12-11-2009 11:44 AM |
| Need Assintance with Simple Indikator ( Easy Language ) | flyingdutchmen | Coding Forum | 1 | 06-30-2008 06:32 PM |
| Easy ADE Problem | bigboy | Coding Forum | 1 | 02-08-2008 06:59 PM |
| Accessing Market Indices in Easy Language | goldspot | Technical Analysis | 3 | 12-26-2007 11:01 PM |
| Easy Language - Help with Simple System | gatrader | E-mini Futures Trading Laboratory | 8 | 12-17-2007 06:40 PM |