Hi,
I am in the process of converting my expert from metastock into an indicator to use in prorealtime and have been scratching my head on the last bit for awhile now.
This section is looking for a short upper or lower wick ( on a candle dominant candle ).
I have the Dominant candle portion of the code working fine but need to add in a condition for a short leading wick to reflect the Metastock system accurately.
This is the guts of what I am working on at the moment
Wick = 0
candlength=High-Low
bodylength=Abs(open-close)
upperwick=high-close
lowerwick=Close-low
IF (bodylength/candlength) > 0.6 AND (upperwick/candlength) <0.25 then
Wick = open-close
R = 0
G = 128
endif
IF (bodylength/candlength) > 0.6 AND (lowerwick/candlength) <0.25 then
Wick = open-close
R = 128
G = 0
ENDif
return Wick coloured(R,G,0) Style(histogram ,2) as "Dominant"
I keeping getting a syntax error for the final line of code?
Can anyone help with what I might be missing ?
coolusername– Welcome to the forums. There are a few simple rules that you need to follow when starting topics. Please give your topic a meaningful title and not something like ‘Help needed’. I have changed your topic title to more accurately reflect the topic.
Also please always use the ‘Insert PRT Button’ when posting code as it makes it far more readable for others. I have tidied up your post. 🙂
As far as your code is concerned I can see no syntax error in it and so have to guess that you are writing indicator code in a strategy code window. RETURN can only be used in indicator coding. When I create your code as an indicator I get no error.