help with conditions for price action
8 replies
simon972
4 years ago #256395
Hello
I am new to using AlgoWizard. Can you please help me with how I create the following conditions in the Full Wizard, relating to my “Bar(1) is either:…” candlestick patterns:
Short rule:
If H(1) > indicator value
AND
Bar(1) is either:
a) a bar with a body (difference between Close & Open) that is < 0.8 pips; OR
b) a Down-bar, with prior bar(2) being an Up-bar, AND with C(1) < C(2) to a minimum degree of 60% of distance between C(2) to O(2), ie. bar(1) body must engulf at least 60% of body of bar(2); OR
c) a Down-bar, with prior bar(2) being an Down-bar, AND with C(1) < C(2), ie. bar(1) must C < body of bar(2)
Then Entry at open (0)
ELSE
If H(2) > indicator value
AND
Bar(1) is either:
a) a bar with a body (difference between Close & Open) that is < 0.8 pips; OR
b) a Down-bar, with prior bar(2) being an Up-bar, AND with C(1) < C(2) to a minimum degree of 60% of distance between C(2) to O(2), ie. bar(1) body must engulf at least 60% of body of bar(2); OR
c) a Down-bar, with prior bar(2) being an Down-bar, AND with C(1) < C(2), ie. bar(1) must C < body of bar(2)
Then Entry at open (0)
Very grateful for any help
simon972
4 years ago #256396
Just to clarify, the second “Bar(1) is either:…” section (after the ELSE If H(2) > indicator value) is exactly the same as the first. The only difference is the “If H(2) > indicator value” bit.
tomas262
4 years ago #256620
Hello,
this seems not difficult but let me ask. Does the H stand for ‘High’? What is the indicator ‘indicator’ used?
simon972
4 years ago #256624
Thanks for replying.
Yes, H = High, C = Close, O = Open. The indicator used is Bollinger Bands upper band; plus High[1] must be a new high of the current day so far (so I assume the way of expressing this is: High[1] > HighD[1])
🙂
tomas262
4 years ago #256729
simon972
4 years ago #256754
Thanks Tomas
I am a little confused by the bit:
(0.6 * Abs((Close(Main chart)[2] – Open(Main chart)[2]))) > Abs((Close(Main chart)[1] – Open(Main chart)[1]))
Isn’t this saying: 60% of bar(2)’s body must be greater than the entire body of bar(1)?
I think I probably didn’t explain this well, when I said:
b) a Down-bar, with prior bar(2) being an Up-bar,
AND with C(1) < C(2) to a minimum degree of 60% of distance between C(2) to O(2), ie. bar(1) body must engulf at least 60% of body of bar(2);
I meant the following:
b) a Down-bar, with prior bar(2) being an Up-bar,
AND Bar(1) must close at a price that is at least 60% below Bar(2)’s close, measured from Bar(2)’s close to its open, ie. basically where bar(1) closes must cover at least 60% of the previous bar’s body.
Please see attached image.
Secondly, could you please tell me how to add a Vertical line signal? (I can only see the option to add a “Draw Down Arrow” action).
Your help is greatly appreciated!
simon972
4 years ago #256894
Hello Tomas, are you able to help with this please?
tomas262
4 years ago #256944
You are right, the comparison must be the opposite < instead of > used so the correct formula is
(0.6 * Abs((Close(Main chart)[2] – Open(Main chart)[2]))) < Abs((Close(Main chart)[1] – Open(Main chart)[1]))
meaning the current bar body (C – O) is larger than 60% of the previous bar body (C – O)
To add a vertical line on each trade entry add a new action – add a Custom action and set this as a command: “ObjectCreate(0, “v_line”+rand(), OBJ_VLINE, 0, TimeCurrent(), 0);”
Let me know if any help needed
FERİD ULUÇINAR
2 years ago #274332
You are right, the comparison must be the opposite < instead of > used so the correct formula is (0.6 * Abs((Close(Main chart)[2] – Open(Main chart)[2]))) < Abs((Close(Main chart)[1] – Open(Main chart)[1])) meaning the current bar body (C – O) is larger than 60% of the previous bar body (C – O) To add a vertical line on each trade entry add a new action – add a Custom action and set this as a command: “ObjectCreate(0, “v_line”+rand(), OBJ_VLINE, 0, TimeCurrent(), 0);” Let me know if any help needed
Thanks for answer. Although it’s an old thread, it worked for me.
Viewing 8 replies - 1 through 8 (of 8 total)