Hi,
Does anyone uses Doji and hammer indicators in trading system ? I have figured out the basuc operational trigger but struggling to set up stop loss and profit parameters. Here is the logic for reference:
IF close>open and high=close and (open-low)>=3*(close-open) THEN
//Detection of Hammer / Black hanging man
Result=1
ELSEIF close > open and high > close and (open – low) >= 3*(high-close) THEN
// Detection of Doji
Result=2
Idea is to setup stop loss 4 points below the low. I tried lot of combinations but doesn’t seem to work. I will really appreciate if someone can help me on this forum. Thanks…
To calculate the stoploss value, you’ll have to find the difference between the price when the trade is initiated and the level where you want it to be set:
stoploss = close-(low-4*pipsize)
Then add this stop value to your order:
SET STOP LOSS stoploss
Thanks Nic. Do i need to define pipsize as a variable or it picks it up automatically ? Sorry If its a basic question. I am quite new to this system.
Nope, pipsize is a built-in instruction. PIPSIZE