Hi,
I want to create a input in my MC Strategy,
Input: oHL(1);
When i select 1 in the input
1 works for greater then sign ">"
2 works for Less then sign "<"
3 input works for Add "+" sign
4 input works for subtraction "-" sign
and oHL i need to put in the strategy like this.
(High ohl Low)
what is the way to assign oHL = 1 for > then or other signs.
Awaiting
Code help
- furytrader
- Posts: 354
- Joined: 30 Jul 2010
- Location: Chicago, IL
- Has thanked: 155 times
- Been thanked: 217 times
Re: Code help
I may be a little confused but maybe I can help.
Do you want the user to be able to assign the input setting oHL to the string value of ">" or do you want to be able to assign oHL the numeric value of 1 ... ?
Do you want the user to be able to assign the input setting oHL to the string value of ">" or do you want to be able to assign oHL the numeric value of 1 ... ?
Re: Code help
I may be a little confused but maybe I can help.
Do you want the user to be able to assign the input setting oHL to the string value of ">" or do you want to be able to assign oHL the numeric value of 1 ... ?
oHL input will be numeric value.
but for each numeric value I want further character assigned like for Numeric "1" input I want Greater than sign ">"
Is it possible?
- furytrader
- Posts: 354
- Joined: 30 Jul 2010
- Location: Chicago, IL
- Has thanked: 155 times
- Been thanked: 217 times
Re: Code help
So you want to be able to assign ">1" as an input setting?
That's possible - it's simply a string input (as opposed to a numeric input).
You would then have to analyze the text string using the built-in PowerLanguage text keywords to identify the individual characters in the string from which to drive your program logic.
If you could explain further what you want to do specifically, I can see what help I can provide.
That's possible - it's simply a string input (as opposed to a numeric input).
Code: Select all
Input: oHL(">1"); // Or whatever the user puts in here
If you could explain further what you want to do specifically, I can see what help I can provide.
Re: Code help
Thanks for prompt reply.So you want to be able to assign ">1" as an input setting?
That's possible - it's simply a string input (as opposed to a numeric input).
You would then have to analyze the text string using the built-in PowerLanguage text keywords to identify the individual characters in the string from which to drive your program logic.Code: Select all
Input: oHL(">1"); // Or whatever the user puts in here
If you could explain further what you want to do specifically, I can see what help I can provide.
I want to use the optimizer to run some optimizing tests so I cann't use ">" sign in the input. Input must be numeric only. In code i need some way that if input is 1 then use ">" or if 2 then "<" sign and like that. Is their any way?
- furytrader
- Posts: 354
- Joined: 30 Jul 2010
- Location: Chicago, IL
- Has thanked: 155 times
- Been thanked: 217 times
Re: Code help
Like I said, I guess I'm confused - I don't really understand what you're trying to do here. It sounds like you're saying that, based on the numeric input oHL, you want to test different conditions. That's pretty easy:
I don't understand when you say "+" sign, unless you're referring to Boolean logic.
Code: Select all
Input: oHL(1);
Condition1 = FALSE;
If oHL = 1 Then Condition1 = X > Y;
If oHL = 2 Then Condition1 = X < Y;
...
If Condition1 = TRUE Then ...