Can coders help with this support/resistance price code?
I have a simple code I have used in ProRealTime that does a really good job of following the support/resistance troughs and peaks of a trending price:
PivotBAR = 4
LookBack = 6
BarLookBack = PivotBAR+1
IF low[PivotBAR] < lowest[LookBack](low)[BarLookBack] THEN
IF low[PivotBAR] = lowest[BarLookBack](low) THEN
SupportPrice = low[PivotBAR]
IF high[PivotBAR] > highest[LookBack](high)[BarLookBack] THEN
IF high[PivotBAR] = highest[BarLookBack](high) THEN
ResistancePrice = high[PivotBAR]
return supportprice, resistanceprice
Is this something could be done with algo wizard to create a custom block that would allow the randomisation of pivot bar and look back parameters maybe?
you need to assign prices to ThirdResistancePrice and other variables so you cannot directly create a custom block for all this.
It is easy to setup a template though that will be used to build new strategies. The parameters can be set to be randomly generated (within pre-define value range)
Thanks Tomas the links were helpful.
So I put the code together as a template in Algo Wizard as per the code in my original post (short trades only just to start). I’ve attached the file.
However it does not make any trades. I’ve checked the template and looks OK. Maybe its something to do with how SQX assigns the value in ‘Rule 6’?
Viewing 3 posts - 1 through 3 (of 3 total)