Rank: Newbie
Groups: Registered, Registered Users Joined: 12/6/2011(UTC) Posts: 8
|
Hello to everyone. Unfortunately couldn't fined answer to my question.
1. I didn't find how to define entry point in System Tester rules.
For example, I need sell contract after price will grow up to (entry price + 2*(entry bar high - entry bar low)).
2. If I need to define data array. For example, a:=from -1 to -5. Because task will be performed, if verify condition for previous bar to -5th bar.
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Unverified Users Joined: 10/10/2010(UTC) Posts: 9
|
for the first problem use this function highestsince ( Nth,
EXPRESSION, DATA ARRAY )
Normal
0
false
false
false
EN-US
X-NONE
AR-SA
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin-top:0cm;
mso-para-margin-right:0cm;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0cm;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:Arial;
mso-bidi-theme-font:minor-bidi;}
Normal
0
false
false
false
EN-US
X-NONE
AR-SA
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin-top:0cm;
mso-para-margin-right:0cm;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0cm;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:Arial;
mso-bidi-theme-font:minor-bidi;}
It returns
the highest value of DATA ARRAY since the Nth most recent occurrence of
EXPRESSION was true. This includes all data loaded in the chart.
for Example:
The formula highestsince(
2, cross (c,mov(c,10,s), close) returns highest value of the close since
the second most recent occurrence of the close crossing above its 10-day moving
average. for the second problem use
ref (data array , periods)
Normal
0
false
false
false
EN-US
X-NONE
AR-SA
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin-top:0cm;
mso-para-margin-right:0cm;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0cm;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:Arial;
mso-bidi-theme-font:minor-bidi;}
Function: references a previous or subsequent element in a data array. A
positive period references “n” periods in the future, a negative period
references “n” periods ago.
Example: ref(C,-20) It
returns the closing price 20 periods ago.
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 12/6/2011(UTC) Posts: 8
|
No, these won't help.
highestsince - "It returns the highest value of DATA ARRAY" - as you see - it's not linked to Entry Point (where we bought or sold)
REF won't help in second question - I need condition to be verified for each of -1st, -2nd, -3rd, -4th, -5th bar. If it will be 100 - will you check it 100 times?!
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Unverified Users Joined: 10/10/2010(UTC) Posts: 9
|
no that will give you the highest price since the latest action happened for example buy signal :
cross(c,mov(c,30,s)) sell signal: valuewhen(1,cross(c,mov(c,30,s)),c)+ 2*(highestsince(1,cross(c,mov(c,30,s)),h)- lowestsince(1,cross(c,mov(c,30,s)),l))
the first part will give you the entry price the second will give you the difference between the high of the bar of the entry price and the low of the bar of the entry price try it
about the second problem give me an example or give me more details
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 12/6/2011(UTC) Posts: 8
|
well. thanks for your trying to help newbies ). Let's imaging. I want to buy with this condition
h>ref(h,-1) and l>ref(l,-1)
but, it could be some bars, that will have // h<h (-1) and l>l (-1)//
how could I exclude these bars?
so, program should wait when general condition will come true
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Unverified Users Joined: 10/10/2010(UTC) Posts: 9
|
Try this valuewhen(1,(h>ref(h,-1) and l>ref(l,-1))+ 2*(highestsince(1,(h>ref(h,-1) and l>ref(l,-1)),h)- lowestsince(1,(h>ref(h,-1) and l>ref(l,-1)),l))
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 12/6/2011(UTC) Posts: 8
|
thank you. I tried some variations with functions and get what I need )
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
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.