| Coding Forum Collaborate, receive help, or discuss coding related issues. |
![]() | | Tweet | |
| | #1 | ||
![]() | Reset EL SetBreakeven I want to set a breakeven stoploss after each new trade has made the appropriate market movement i.e. in the market & 50% towards price target. If Condition13 = True and Condition14 =True Then Begin SetStopContract; SetBreakeven(1); End;End; However once set for the first trade it stays set for all subsequent trades, is there a way to close it when the trade closes or do I have to go about it a different way? Lowly 2000i code only and out of ideas. | ||
| |
|
| | #2 | ||
![]() | Re: Reset EL SetBreakeven If you want the Setbreakeven to execute only for the first trade, then you could write something like, Code: if Totaltrades < 1 then setbreakeven(1); Code: if condition99 then setbreakeven(1); //where condition99 is your's EasyTrader_I. | ||
| |
|
| | #3 | ||
![]() | Re: Reset EL SetBreakeven | ||
| |
|
| | #4 | ||
![]() | Re: Reset EL SetBreakeven if ifintrade and Condition13 and Condition14 Then Begin SetStopContract; SetBreakeven(1); End;End; but it may have been as simple as resetting conditions if marketposition = 0 then condition-that-kicks-in-breakeven = false; | ||
| |
|
| The Following User Says Thank You to statsign For This Useful Post: | ||
deadloss (01-21-2011) | ||
| | #5 | ||
![]() | Re: Reset EL SetBreakeven Quote:
it might not execute.
__________________ Only an idiot would reply to a stupid post | ||
| |
|
| | #6 | ||
![]() | Re: Reset EL SetBreakeven | ||
| |
|
| | #7 | ||
![]() | Re: Reset EL SetBreakeven Quote:
ppl often get carried away when tweaking their codes, they adding conditions upon conditions to their strategies as an after thought and forgotten that IF one of the condition does not meet the criteria, the stoploss will not be in place anymore.
__________________ Only an idiot would reply to a stupid post | ||
| |
|
| | #8 | ||
![]() | Re: Reset EL SetBreakeven You may be correct sometimes, But if you expertise in Tradestaion Programming or any with any other platform, then it doesn't effect though..right? So stoploss/breakeven/profit target will work in a condition only if you code it such a way... Please correct me if I am wrong.. EasyTrader_I | ||
| |
|
![]() |
| Tags |
| breakeven, easylanguage, stoploss, strategy engine |
| Thread Tools | |
| Display Modes | Help Others By Rating This Thread |
| |
| ∧ Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Reset or Clear Each New Bar | PeterBrazel | Coding Forum | 10 | 10-28-2009 11:19 AM |