Need help in AFL coding

i am new to trading and dont have much knowledge in afl - i need afl code to send buy/sell signal to nest when the target achieved. i have the afl to place the order when the buy/sell signal triggered.
now i need afl code to trigger the buy/sell when it reached my given target/stop loss.

i have a method (E_GetMTM() and E_GetNetQty() functions)to give net quantity and profit/loss values, need to add code if net quantity is non zero and profit/loss is crossed my target amount then i need a conditional call to E_TradeExit() ( this function is also in AFL to do sell by click of button in afl ), once position is squared off quantity will be zero and routine will stop

Target = ParamStr("Target","10");
StopLoss = ParamStr("StopLoss", "100");


Similar threads