| Coding Forum Collaborate, receive help, or discuss coding related issues. |
![]() | | Tweet | |
| | #9 | ||
![]() | Re: Help Needed For Indicator Once you trigger true nothing in your code ever resets back to false. Either always reset to false at the start of your code -or- have an else clause where you test your conditions. The former will just show the bar that transitions from false to true the latter will show all bars that meet the condition. Simple logic error. Problem solved as far as I can see. | ||
| |
|
| | #10 | ||
![]() | Re: Help Needed For Indicator Quote:
[1]Symbol, [2] Slow Stochs, [3] Fast Stochs. --> Note: I do expect the data series to be in the right place; I don't error check on this since I write stuff for myself and keep all my setups correct by hand :-) B) So you're looking for divergence between data series [2] & [3] then, from what I read above. C) The main condition is that both lines in [2] are flat or down and both lines in [3] are up. D) Crossing of the lines is not relevant here; just [2] both flat/down and [3] up at the same time. E) The processing of the conditions does not occur intra-bar, only on closed bars. Is this correct? I'm rebuilding some code now that was lost during a BlueScreen this morning, so since most of this is the same as what I have, I'll post what I have later and you can use it if you want or can change it to whatever you need. MTG | ||
| |
|
| | #11 | ||
![]() | Re: Help Needed For Indicator Quote:
that's why I insist on people writing out their thoughts, instead of jumping into coding immediately. Quote:
I really don't care if he solved the problem... some people only want a quick fix. As far as I am concerned, the "problem" is not in the logic.
__________________ ..........This is a terribly difficult question to answer. The only satisfactory answer is: "It depends"... | ||
| |
|
| | #12 | ||
![]() | Re: Help Needed For Indicator this will probably do it though I have simply modified your original code so might not be the most elegant way of doing it. Code: inputs:
fastLength(5),
slowLength(10),
BEx(0.5);
Var:
longTrigger(false),
longTriggerValue(0),
fastValue(0),
slowValue(0);
longTrigger = false;
Value1=LOW ;
fastValue = Average( Close, fastLength );
slowValue = Average( Close, slowLength );
if fastvalue[1]<=fastvalue[2] or slowValue[1] <= slowValue[2] then {where previous MA's down?}
If FastValue>FastValue[1] and slowvalue>slowvalue[1] {if so check if current MA is up}
and close>open then longTrigger = true;
if longTrigger=true then
begin
longTriggerValue = High +( range * BEx );
Plot1(Value1);
Plot2(LongTriggerValue);
end; | ||
| |
|
| The Following User Says Thank You to BlowFish For This Useful Post: | ||
nab999 (11-29-2009) | ||
| | #13 | ||
![]() | Re: Help Needed For Indicator Quote:
. He posted some code that he had taken a stab at, reasonably clearly described what he was trying to do and posted a chart with an illustration of how it looked and how it should look. Compared to many of the "please help" posts a zillion miles ahead ! I think (though I may be mistaken) there was enough information in the original post to provide a solution. Time will tell I guess!Having said that your advice was spot on for him finding the solution for himself. | ||
| |
|
| | #14 | ||
![]() | Start simple, test, expand, test, etc. is my motto :-) Anyway, since I have a similar indicator, just offering to share/help as best I can; not necessarily fix anything existing ... just giving back what I can as I get help from time-to-time as well. I'm not claiming anyone, myself included, right or wrong; just providing options :-) | ||
| |
|
| | #15 | ||
![]() | Re: Help Needed For Indicator most wishful thinkers write in mumble jumbles... writing out their fantasy is easy, but until people can write out their "wishes" one thought/one line at a time... the codes will be mumble jumble too. I have yet to be proven wrong on that. ;-)>
__________________ ..........This is a terribly difficult question to answer. The only satisfactory answer is: "It depends"... Last edited by Tams; 11-27-2009 at 11:24 AM. | ||
| |
|
| | #16 | ||
![]() | Re: Help Needed For Indicator | ||
| |
|
![]() |
| Tags |
| moving average |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
| ∧ Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help Needed for Indicator | DutchAngel | Coding Forum | 4 | 04-16-2009 06:22 AM |
| WOLFE WAVE Indicator Needed | ropulos | Coding Forum | 29 | 12-24-2008 03:18 AM |
| Chaikin's Volatility Indicator Needed | TipsyTzar | Coding Forum | 4 | 12-01-2008 03:25 AM |
| Indicators needed ( help) | stocktrader.in | Coding Forum | 4 | 11-18-2008 02:44 PM |
| just what i needed | xztheericzx | Beginners Forum | 0 | 11-04-2007 06:21 AM |