What code to use to add a multiplier to an ATR?

 

Hello,


this is my rule for closing a sell trade:

if((Bid>iATR(NULL,0,14,1)))


please could somebody tell me what I need to change in that code if I wanted to use three times the ATR (14) value (creating more distance from the bid, not a longer lookback period for the ATR)?


Thank you!

 

You are mixing apples with onions.

Bid is price but ATR is the difference of two prices! Maybe you meant something like:

   
   if(Bid > entry + c*iATR(..) ) { ...

Please use the SRC button for posted code.

 
Carl Schreiber:

You are mixing apples with onions.

Bid is price but ATR is the difference of two prices! Maybe you meant something like:

Please use the SRC button for posted code.


Thank you very much!! Yes, that's what I'm after!

Apologies for expressing it misleadingly

Reason: