how to plot APPLYSTOP function

mehtaka

Active Member
#1
Hello,
Can anyone help me on how to plot Applystop function in chart?
My code for the applystop function is...
"ApplyStop(stopTypeLoss,stopModePoint,3*ATR(10),1) "

The function is for the initial stop loss and not the trailing one.
So once i get the buy signal it should plot the stopline as per the applystop...
and same goes with the short.
 

ocil

Well-Known Member
#2
I want stop loss fixed 40 point from my buy & sell. Also I want profit booking at 85 point from buy & sell. Can anyone help to code in AFL. Thanks for help.
 

mehtaka

Active Member
#3
I want stop loss fixed 40 point from my buy & sell. Also I want profit booking at 85 point from buy & sell. Can anyone help to code in AFL. Thanks for help.
u can get that from the AA setting window... input your stops and profit in the "Stop" tab
 

mehtaka

Active Member
#4
Hello,
Can anyone help me on how to plot Applystop function in chart?
My code for the applystop function is...
"ApplyStop(stopTypeLoss,stopModePoint,3*ATR(10),1) "

The function is for the initial stop loss and not the trailing one.
So once i get the buy signal it should plot the stopline as per the applystop...
and same goes with the short.
no reply yet...????
 

trash

Well-Known Member
#7
They both are examples of trailing stoploss..
i am looking out for the initial stoploss..
So????

Simply adjust the code given by Tomasz.

Instead of stoptypetrailing use stoptypeloss and stoptypeprofit.
Instead of stopmodepercent use stopmodepoint.
Instead of Highestsince(....) use Valuewhen(Buy, Buyprice - stoplevel) and/or Valuewhen(Buy, Buyprice + tgtlevel)

And it will look like below


And one hint in regards to plotshapes
 
Last edited:
#9

trash

Well-Known Member
#10
Hello trash,

I tried but its showing errors.

Would u please post code for above picture shown by you.
It shows errors because the code snippet of the picture is just one part of the whole code.

It doesn't help you if I post the whole code. Then you don't learn anything. Just look at the code posted at AmiBroker website and play around with it.
 

Similar threads