Tradecision Talks
May 26, 2013, 12:45:03 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Adding time condition to a new strategy  (Read 5661 times)
stockpicker
Newbie
*
Posts: 2


« on: September 24, 2008, 10:39:17 PM »

Hi i was hoping if you could lend a hand with the following strategy. We are looking at a long strategy with the following conditions and have listed what we have written in the strategy builder below.

1. Firstly we have ADX(21)>ADX(21)\1\ listed though we are wanting the ADX to only give a buy when the ADX value in the current period is larger than 0.25 than the previous period. IE buy if current ADX is 24.31 and previous period is 24.04 for instance though not buy if current period is 24.31 and previous is only 24.20.

2. Secondly we are needing to put some time condition into the strategy so that it doesn't constantly run across all timeframes going back in the charts. We are wanting it to only trade between 17:00 and 08:00 though anything outside this timeframe will not be accounted for in the strategy.

Can this be done?

Long Entry Condition:
 
1) 8 EMA > 13 EMA
2) +DMI > -DMI
3) ADX > -DMI & ADX increase from period before of >0.25
4) RSI < 75


return (DMIPlus(21)>DMIMinus(21)) and (EMA(C,8)>EMA(C,13)) and ADX(21)>DMIMinus(21)and RSI(C,14)<75 and ADX(21)>ADX(21)\1\ ;
Logged
Tradecision Support Team
Hero Member
*****
Posts: 336


« Reply #1 on: September 26, 2008, 06:41:48 AM »

Dear stockpicker,

Here is the following code:

return (DMIPlus(21)>DMIMinus(21)) and (EMA(C,8)>EMA(C,13)) and ADX(21)>DMIMinus(21)and RSI(C,14)<75 and ADX(21)>ADX(21)\1\

and ((ADX(21)-ADX(21)\1\) > ADX(21)* 0.25) and (hour() >= 17 or hour() < 8 ) ;


Sincerely,
Tradecision Support Team

Hi i was hoping if you could lend a hand with the following strategy. We are looking at a long strategy with the following conditions and have listed what we have written in the strategy builder below.

1. Firstly we have ADX(21)>ADX(21)\1\ listed though we are wanting the ADX to only give a buy when the ADX value in the current period is larger than 0.25 than the previous period. IE buy if current ADX is 24.31 and previous period is 24.04 for instance though not buy if current period is 24.31 and previous is only 24.20.

2. Secondly we are needing to put some time condition into the strategy so that it doesn't constantly run across all timeframes going back in the charts. We are wanting it to only trade between 17:00 and 08:00 though anything outside this timeframe will not be accounted for in the strategy.

Can this be done?

Long Entry Condition:
 
1) 8 EMA > 13 EMA
2) +DMI > -DMI
3) ADX > -DMI & ADX increase from period before of >0.25
4) RSI < 75


return (DMIPlus(21)>DMIMinus(21)) and (EMA(C,8)>EMA(C,13)) and ADX(21)>DMIMinus(21)and RSI(C,14)<75 and ADX(21)>ADX(21)\1\ ;

« Last Edit: September 29, 2008, 02:00:32 AM by Tradecision Support Team » Logged
stockpicker
Newbie
*
Posts: 2


« Reply #2 on: September 28, 2008, 09:46:09 PM »

Thank you very much for that, however shouldnt and ((ADX(21)-ADX(21)\1\) > ADX(21)* 0.25) be ((ADX(21)-ADX(21)\1\) > ADX(21)+ 0.25) with a plus being the current ADX +.25 and not multiplied by 0.25 as that would lead to a lower number than the previous ADX period?

and ((ADX(21)-ADX(21)\1\) > ADX(21)* 0.25) and (hour() >= 17 or hour() <
Logged
Tradecision Support Team
Hero Member
*****
Posts: 336


« Reply #3 on: September 29, 2008, 07:42:19 AM »

Dear stockpicker,

We just thought that you want to compare ADX difference with 25% from ADX in the current period. And you want to compare ADX difference with change in price on 25%.
And in your case the final expression should be:

((ADX(21)-ADX(21)\1\) > 0.25);

Sincerely,
Tradecision Support Team


Thank you very much for that, however shouldnt and ((ADX(21)-ADX(21)\1\) > ADX(21)* 0.25) be ((ADX(21)-ADX(21)\1\) > ADX(21)+ 0.25) with a plus being the current ADX +.25 and not multiplied by 0.25 as that would lead to a lower number than the previous ADX period?

and ((ADX(21)-ADX(21)\1\) > ADX(21)* 0.25) and (hour() >= 17 or hour() <
Logged
pexedicaitede
test
Newbie
*
Posts: 2

[url=http://services.my-addr.com/online-bulk-email-verification-validator.php]bulk email validation[/url]


« Reply #4 on: July 31, 2010, 06:08:38 PM »

Thank you for getting back and letting me know what happened.  Now that I know it was a one-time problem, I feel so much better.  Much relief; thanks.
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!