How to code for a retest of the low

Questions about MultiCharts and user contributed studies.
arjfca
Posts: 1260
Joined: 23 Nov 2010
Has thanked: 716 times
Been thanked: 221 times

How to code for a retest of the low

Postby arjfca » 27 Jan 2011

Hello again

I'm trying to code for a retest of a previous low, with no success yet

The idea, price, often test a precious low and cross or rebounce just before on it, Then, just like a slingshot it is pusch upward

Any hint to start me on the code

Martin
Attachments
Retest of the low.gif
Retest of the low.gif (8.65 KiB) Viewed 130 times

User avatar
TJ
Posts: 6518
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 957 times
Been thanked: 1883 times

Re: How to code for a retest of the low

Postby TJ » 27 Jan 2011

here are my thoughts...

Image
Attachments
Retest of the low -1.gif
Retest of the low -1.gif (6.69 KiB) Viewed 218 times

User avatar
TJ
Posts: 6518
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 957 times
Been thanked: 1883 times

Re: How to code for a retest of the low

Postby TJ » 27 Jan 2011

Image
Attachments
Retest of the low -2.gif
Retest of the low -2.gif (6.84 KiB) Viewed 217 times

arjfca
Posts: 1260
Joined: 23 Nov 2010
Has thanked: 716 times
Been thanked: 221 times

Re: How to code for a retest of the low

Postby arjfca » 27 Jan 2011

Hello TJ

Not sure if I understand your question. Both bar is a pivot. But to my opinion, waiting for a pivot is sometime to late. My idea is to test if the price of a bar cross below or jump above the first pivot . This is a setup that i use in manual trading.

If price cross below a previous pivot low, go long at high +1
If a hammer did not cross below a previous pivot low, go long at high +1
If Inside bar, 2 orders: Go long at high +1 // Go short at low -1 Price may go on either side

Whit my limited knowledge of Multicharts, I just can't figure how to code it. I will look again around the pivot. What i need to know is the price of a previous pivot low, but we could see many pivot low between these bars.

How to discriminate out of the pivot low, the lowest pivot that a bar could encountered. This is my interrogation.

Martin

User avatar
TJ
Posts: 6518
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 957 times
Been thanked: 1883 times

Re: How to code for a retest of the low

Postby TJ » 27 Jan 2011

arjfca wrote:Hello TJ
...
Whit my limited knowledge of Multicharts, I just can't figure how to code it. I will look again around the pivot. What i need to know is the price of a previous pivot low, but we could see many pivot low between these bars.

How to discriminate out of the pivot low, the lowest pivot that a bar could encountered. This is my interrogation.

Martin

Slow down...
we are not at programming yet.

Before you can program something, you have to define it first.

The first thing is to tell MultiCharts that this, to your specification, is a "PIVOT".

This "pivot" is the basis of your analysis...
without this starting point, there is no "test".

Your task...
look at the chart and ask yourself:
1. why do I call this a pivot?
2. what are the attributes and characteristics of a pivot? can I quantify it?
3. at what point can I confirm that this is a pivot? (next bar? 3 bars from low?)

if you can quantify an idea,
you can code it.

User avatar
TJ
Posts: 6518
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 957 times
Been thanked: 1883 times

Re: How to code for a retest of the low

Postby TJ » 27 Jan 2011

let me give you an overly simplified example...

Code: Select all


pivot.low = lowest( low, 20);





or you can look at some complicated and sophisticated examples...
in your PLEditor, look for function names starting with
pivot***
swing***

arjfca
Posts: 1260
Joined: 23 Nov 2010
Has thanked: 716 times
Been thanked: 221 times

Re: How to code for a retest of the low

Postby arjfca » 27 Jan 2011

TJ, :)

That could be a solution, but price may rebounce on a pivot low that is not the lowest pivot low of a given period.

My setup is strict and it is call a Fake Out: maybe i did not explain it well.
Go long if price go below a previous pivot low. That is not The lowest pivot low, just a previous pivot. A low that as not been crossed before. If a previous pivot low as been crossed before, it is not a valid pivot low for this bar. Only the virgin one and in a direct view

Quest continu
Martin

User avatar
TJ
Posts: 6518
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 957 times
Been thanked: 1883 times

Re: How to code for a retest of the low

Postby TJ » 27 Jan 2011

arjfca wrote:TJ, :)

That could be a solution, but price may rebounce on a pivot low that is not the lowest pivot low of a given period.

My setup is strict and it is call a Fake Out: maybe i did not explain it well.
Go long if price go below a previous pivot low. That is not The lowest pivot low, just a previous pivot. A low that as not been crossed before. If a previous pivot low as been crossed before, it is not a valid pivot low for this bar. Only the virgin one and in a direct view

Quest continu
Martin

Human mind is a powerful piece of equipment...
We do thousands of analysis, evaluation, comparisons, filtering, judging, all in a split second.
Many of our logics are locked away in the depths of our brain, only to be recalled when needed.

My suggestion is...
go back to the first diagram above, and start writing down your observation of that specific moment.

then go to the next bar...
what would happen if the next bar makes another low?
what if the next bar is an inside bar?
what if the next bar makes a high? will it go higher from there?
what if the next bar makes another low, then reverses to higher high?
what if the bar makes a higher high, but closes inside the previous range?
Does volume come into play here?

As a trader, we deal with all these issues... subconsciously.
Coding will make you a better trader,
because you force yourself to understand your unwritten logics.

User avatar
arnie
Posts: 1567
Joined: 11 Feb 2009
Location: Portugal
Has thanked: 470 times
Been thanked: 503 times

Re: How to code for a retest of the low

Postby arnie » 27 Jan 2011

Hi arjfca,

Maybe you should read about Gann's swing charts. You'll not find any better way to read a swing chart and with them find your pivots.

http://www.tradingmarkets.com/.site/for ... -80152.cfm

arjfca
Posts: 1260
Joined: 23 Nov 2010
Has thanked: 716 times
Been thanked: 221 times

Re: How to code for a retest of the low

Postby arjfca » 27 Jan 2011

Thank you for your input TJ

As always, intersting and appreciated.

Yes that is true that coding and backtesting resolve some problem and force the mind toward understanding the trading business. This setup that i described is valid for me as it is written. Nothing to add, plain and direct.

Coding is a description of a mental or visual step. Easier said than done for me. hehe!

I will put that problem back in my head and a solution will eventually come out. I got many other parts to correct or add in my signal.

Martin

User avatar
TJ
Posts: 6518
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 957 times
Been thanked: 1883 times

Re: How to code for a retest of the low

Postby TJ » 27 Jan 2011

often we spend uncountable time and energy
looking for a silver bullet that could solve a problem.

often, all it takes is 2 simple aspirins.


Return to “MultiCharts”