Using an indicator variable in a strategy?

JohnKelly

Newbie
Messages
2
Likes
0
Say I had the following indicator and strategy files:

// indicator.eld file
LineVar = 1.54

// strategy.eld separate file
If LineVar > 0 then Buy
If LineVar < 0 then Sell

How can strategy.eld know what value is contained in variable LineVar?
 
You would need to set up the basics of the indicator within the strategy, so whatever makes LineVar have a value of 1.54, this has to be inserted into the strategy. Here's an example of a cci below:

// indicator.eld file
CCiValue = 154

// strategy.eld separate file
If CCiValue > 0 then Buy
If CCiValue < 0 then Sell

On this example you would have to insert the variable into the strategy, which would be

CCiValue = cci(Length);

Hope this helps

Blu-Ray
 
Indicators in strategy?

You would need to set up the basics of the indicator within the strategy, so whatever makes LineVar have a value of 1.54, this has to be inserted into the strategy. Here's an example of a cci below:

// indicator.eld file
CCiValue = 154

// strategy.eld separate file
If CCiValue > 0 then Buy
If CCiValue < 0 then Sell

On this example you would have to insert the variable into the strategy, which would be

CCiValue = cci(Length);

Hope this helps

Blu-Ray

Hi,
Can a third party indicator be referenced in an easylanguage strategy? I have the indicator in use on tradestation but I really would like to automate it in a strategy. Can I possibly reference the indicator in a strategy like ......if apollo >price buy at close ....where apollo is the custom indicator? If not directly possible is there a way round this problem?
Thank you.
Thank you.
 
Hi,
Can a third party indicator be referenced in an easylanguage strategy? I have the indicator in use on tradestation but I really would like to automate it in a strategy. Can I possibly reference the indicator in a strategy like ......if apollo >price buy at close ....where apollo is the custom indicator? If not directly possible is there a way round this problem?
Thank you.
Thank you.

Yes it's possible, providing you have access to the third party indicator's function.

Cheers

Blu-Ray
 
Top