Expressions in Rule based strategy builder
Author: shardis89
Creation Date: 1/10/2012 12:31 PM
profile picture

shardis89

#1
Is there a way to create simple expressions in the rule base strategy builder. If not there should be. It seems like there should be a way to add expressions (e.g. Price x 0.98 >= 5, etc.). Would sure make building strategies easier. I am trying to build a strategy that sells at the market when a profit target is hit; however the rule based logic uses a limit order, so when I try to change the code from SellatLimit to SellatMarket it gives me an error. Since I am not a programmer, it would sure make it easier for me to just use an expression such as (Price >= EntryPrice * 1.10)then SellAtMarket
profile picture

Cone

#2
We could add a rule for that in the Position-Based conditions in the Community.Rules project. Please create a Support Ticket for it.

In the meantime, when you change the SellAtLimit to SellAtMarket, make sure to eliminate the parameter for the limit price, i.e.,

CHANGE:
SellAtLimit(bar + 1, LastPosition, someLimitPrice, "exit signal");

TO:
SellAtMarket(bar + 1, LastPosition, "exit signal");
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).