logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
ketal  
#1 Posted : Wednesday, February 11, 2015 5:33:48 PM(UTC)
ketal

Rank: Member

Groups: Registered, Registered Users, Unverified Users
Joined: 3/7/2014(UTC)
Posts: 17

Thanks: 6 times

Hi,

Below is the formula for wide range bar:

Fml("Range")>Ref(Fml("Range"),-1) AND Fml("Range")>Ref(Fml("Range"),-2) AND Fml("Range")>Ref(Fml("Range"),-3)

Range = Abs(C-O)

I want to overlay the above formula on the chart as dot in the center of body of candlesticks, whichever is confirming the formula.

 

Kindly help.

 

Regards,

Ketal

 

MS Support  
#2 Posted : Wednesday, February 11, 2015 5:39:50 PM(UTC)
MS Support

Rank:: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,960

Thanks: 91 times
Was thanked: 155 time(s) in 150 post(s)
Hello, Are you saying you already have a formula named "Range" in your program? The formula would likely not display very well as an indicator on top of the candlesticks, but you could do something along these lines inside a New Expert Advisor using the "Symbols" tab. Symbols can be placed above or below the price plot and you can pick from several different symbol types.
thanks 1 user thanked MS Support for this useful post.
ketal on 2/12/2015(UTC)
mstt  
#3 Posted : Wednesday, February 11, 2015 6:59:09 PM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Hi Ketal

If I understand you correctly then the following formula will do what you want. Ideally you should create a template with the formula. That's because it's a little messy to set up a chart just the way you want it each time you use the indicator. I'm assuming that your "Range" formula is in fact.

Range:=Abs(C-O);

If that's not the case then my "solution" is not the answer that you're looking for. Anyway, here's the indicator that I've created, with instructions on how to set it up.

{Range Dot}
Range:=Abs(C-O);
Dot:=Range>Ref(Range,-1) AND Range>Ref(Range,-2) AND Range>Ref(Range,-3);
Dot*(C+O)/2;
ValueWhen(1,0,0);


When you add this indicator to the Indicator Builder you must first put braces {} around the ValueWhen() line. If you don't do it it will be very difficult to set up the color, style, weight and scaling of the plot you're trying to achieve. The indicator must be scaled the same as the chart you're plotting it on (while the ValueWhen() function is commented out) or the indicator, set as heavy dots, will "float" above and below the upper and lower limits of the chart.

The reason for adding ValueWhen at the end of the indicator is to generate an N/A result from the indicator, and this allows the zero and price dot values to float above and below the target charts visible range. Therefore it's essential to scale the indicator to the price chart before enabling the ValueWhen() function. Once the indicator is scaled to the chart the ValueWhen() function can be disabled, and this allows the zero values to "float" below the visible range of the price chart, but price values of the indicator will appear smack in the middle of the appropriate candles.

Once you've set up one chart the way you want it you should save that chart as a template so that it can be applied to any chart. Or you could save as the default template, in which case every chart you open will include centered dots where appropriate.

Hope this helps.

Roy


Edited by user Wednesday, February 11, 2015 7:00:48 PM(UTC)  | Reason: Not specified

thanks 1 user thanked mstt for this useful post.
ketal on 2/12/2015(UTC)
mstt  
#4 Posted : Wednesday, February 11, 2015 7:06:15 PM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Well, it seems that a post cannot be edited twice so here's my second correction. If I understand you correctly then the following formula will do what you want. Ideally you should create a template with the formula. That's because it's a little messy to set up a chart just the way you want it each time you use the indicator. I'm assuming that your "Range" formula is in fact. Range:=Abs(C-O); If that's not the case then my "solution" is not the answer that you're looking for. Anyway, here's the indicator that I've created, with instructions on how to set it up. {Range Dot} Range:=Abs(C-O); Dot:=Range>Ref(Range,-1) AND Range>Ref(Range,-2) AND Range>Ref(Range,-3); Dot*(C+O)/2; ValueWhen(1,0,0); When you add this indicator to the Indicator Builder you must first put braces {} around the ValueWhen() line. If you don't do it it will be very difficult to set up the color, style, weight and scaling of the plot you're trying to achieve. The indicator must be scaled the same as the chart you're plotting it on (while the ValueWhen() function is commented out) or the indicator, set as heavy dots, will "float" above and below the upper and lower limits of the chart. The reason for adding ValueWhen at the end of the indicator is to generate an N/A result from the indicator, and this allows the zero and price dot values to float above and below the target charts visible range. Therefore it's essential to scale the indicator to the price chart before enabling the ValueWhen() function. Once the indicator is scaled to the chart the ValueWhen() function can be enabled, and this allows the zero values to "float" below the visible range of the price chart, but price values of the indicator will appear smack in the middle of the appropriate candles. Once you've set up one chart the way you want it you should save that chart as a template so that it can be applied to any chart. Or you could save as the default template, in which case every chart you open will include centered dots where appropriate.
thanks 2 users thanked mstt for this useful post.
MS Support on 2/11/2015(UTC), ketal on 2/12/2015(UTC)
MS Support  
#5 Posted : Wednesday, February 11, 2015 7:14:47 PM(UTC)
MS Support

Rank:: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,960

Thanks: 91 times
Was thanked: 155 time(s) in 150 post(s)
Hi Roy, Will see if I can find out anything about the editing issue.
mstt  
#6 Posted : Wednesday, February 11, 2015 8:25:27 PM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Thanks MS Support, I should have taken more care when editing. Roy
Justin  
#7 Posted : Wednesday, February 11, 2015 11:23:25 PM(UTC)
Justin

Rank: Advanced Member

Groups: Registered, Registered Users, Unverified Users
Joined: 9/13/2004(UTC)
Posts: 673
Location: Salt Lake City, UT

Hi Roy,


I wasn't quite able to reproduce your issue. However, I did notice something odd when I tried to Edit my post 20 minutes later. When the Editor opened, the Body box was a dark gray color like you wouldn't be able to edit this. However, if you look in the lower right of the window, there may be a triangular corner you can click and drag to make larger. When I did this, I was able to see the text in my message and edit it again. Hopefully this might help.  This also only appears to affect Firefox for me, Chrome handles the Edit fine every time.

Edited by moderator Wednesday, February 11, 2015 11:40:23 PM(UTC)  | Reason: Not specified

ketal  
#8 Posted : Thursday, February 12, 2015 4:05:44 AM(UTC)
ketal

Rank: Member

Groups: Registered, Registered Users, Unverified Users
Joined: 3/7/2014(UTC)
Posts: 17

Thanks: 6 times

Hi,

Thanks a ton for the refined formula (i am still at the novice level in coding) and it working as i wanted. I have not changed anything in the formula provided by you simply copy pasted it as indicator and overlay it and converted into dot lines. Its working quite well.

 

Thanks once again.

 

Regards,

Ketal

 

Originally Posted by: mstt Go to Quoted Post
Well, it seems that a post cannot be edited twice so here's my second correction.


If I understand you correctly then the following formula will do what you want. Ideally you should create a template with the formula. That's because it's a little messy to set up a chart just the way you want it each time you use the indicator. I'm assuming that your "Range" formula is in fact.

Range:=Abs(C-O);

If that's not the case then my "solution" is not the answer that you're looking for. Anyway, here's the indicator that I've created, with instructions on how to set it up.

{Range Dot}
Range:=Abs(C-O);
Dot:=Range>Ref(Range,-1) AND Range>Ref(Range,-2) AND Range>Ref(Range,-3);
Dot*(C+O)/2;
ValueWhen(1,0,0);


When you add this indicator to the Indicator Builder you must first put braces {} around the ValueWhen() line. If you don't do it it will be very difficult to set up the color, style, weight and scaling of the plot you're trying to achieve. The indicator must be scaled the same as the chart you're plotting it on (while the ValueWhen() function is commented out) or the indicator, set as heavy dots, will "float" above and below the upper and lower limits of the chart.

The reason for adding ValueWhen at the end of the indicator is to generate an N/A result from the indicator, and this allows the zero and price dot values to float above and below the target charts visible range. Therefore it's essential to scale the indicator to the price chart before enabling the ValueWhen() function. Once the indicator is scaled to the chart the ValueWhen() function can be enabled, and this allows the zero values to "float" below the visible range of the price chart, but price values of the indicator will appear smack in the middle of the appropriate candles.

Once you've set up one chart the way you want it you should save that chart as a template so that it can be applied to any chart. Or you could save as the default template, in which case every chart you open will include centered dots where appropriate.

 

mstt  
#9 Posted : Thursday, February 12, 2015 8:49:31 AM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Hi Justin Thanks for the feedback. I think I'll be more careful with my proof reading in future so i don't need to edit five minutes later. My first edit worked fine but the text didn't appear the second time I attempted it. Roy
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.