Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Entry Price Reference Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
mezic
Posted : Monday, November 24, 2014 12:44:05 PM
Gold Customer Gold Customer

Joined: 5/20/2010
Posts: 33

Is there any way to reference the entry price in Realcode? For example, I'd like to jump to an alternate subroutine if a certain level of profit/loss is attained.

Bruce_L
Posted : Monday, November 24, 2014 4:30:29 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

If you are just looking at a single symbol at a time, you could have a variable for this:

Dim Entry As Single = 5

Or set up a UserInput which you could change whenever you switch symbols.

'# Entry = UserInput.Single = 5


-Bruce
Personal Criteria Formulas
TC2000 Support Articles
mezic
Posted : Monday, November 24, 2014 4:58:32 PM
Gold Customer Gold Customer

Joined: 5/20/2010
Posts: 33

Bruce, I'm looking for something much more dynamic. I'd like to write a routine that would use the entry price of system generated buy or sell signal for any given symbol, then branch to a different set of rules if a specific profit or loss is achieved.

Bruce_L
Posted : Friday, November 28, 2014 10:40:53 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

If the entry price is algorithimically generated as part of the RealCode, then yes, you can use it. You would just assign it to a static variable when you generate it.

There is no way to reference the entry price used in BackScanner in RealCode however. So if you want that value, you would generally need to re-create the entire BackScan in your RealCode. This can be quite complicated.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
mezic
Posted : Monday, December 8, 2014 8:42:59 AM
Gold Customer Gold Customer

Joined: 5/20/2010
Posts: 33

Ok Thanks Bruce.

In lieu of that, is there a way to steup conditional trading rules, such as stops or profit targets? For example: if a certain condition (rule) is met, then impose a 10% trailing stop.

Bruce_L
Posted : Monday, December 8, 2014 4:13:41 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

You can only kind of do this.

BackScanner Rules are evaluated from top to bottom. Once one of the rules returns true, the rest of the rules are not evaluated.

So you could add a BackScanner Rule set to Remain in Trade based on a condition of some sort and put it above your trailing stop rule in BackScanner. The trailing stop would not be able to trigger unless the Remain in Trade rule above it was False.

This means you would need to create the reverse of the condition you want to use to trigger the trailing stop to use as the trailing stop trigger,

Note that this is not a sequence. You couldn't have something like the condition triggering the trailing stop for the rest of the trade. If the condition reverts to a state where the Remain in Trade rule evaluates as true, the trailing stop won't trigger.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
mezic
Posted : Monday, December 8, 2014 5:13:23 PM
Gold Customer Gold Customer

Joined: 5/20/2010
Posts: 33

Thanks again Bruce. I think I understand.

I wish you guys were still investing in this tool.

Bruce_L
Posted : Tuesday, December 9, 2014 12:23:59 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

You're welcome.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.