Consider this problem: you may be trading in 100 different symbols, and all with different quantities. You can specify the quantity here in APIBridge->Symbol Setting.
Firstly if you want to scale-in to positions, it will be difficult to code all quantities in your strategy program such as Amibroker or MT4.
Secondly, same goes for scale-out also, if you want to exit (say) 40% of all net positions, in that case it will be difficult to code for all different quantities.
So In that case the problem amplifies if you are trading in multi-client accounts.
In that case to solve this problem, we have additional hack in Signal protocol call Qty Multiplier. Moreover before reading further, you should be thorough in coding Signal for all available parameters.
Qty multiplier for LE/SE/LX/SX
In the signal:
ID,Type,Symbol,OrderType,TrigPrice,Price,Qty,InstrumentName,StrategyTag
Qty can also be given as Qty|EntryQtyMultiplier|ExitQtyMultiplier
Final qty for order placeemnt for LE/SE= int(Qty(from signal/ui) * EntryQtyMultiplier)
Final qty for order placeemnt for LX/SX= int(NetPos * ExitQtyMultiplier); where ExitQtyMultiplier = Min(1, ExitQtyMultiplier)
Scale-in Example:
AlgoJi_Signal(“1”, “LE”,”AA”,”L|NRML”,””,”305″,”100|3″,”EQ”,”STG1″);
In case In symbol settings assume qty is null
Qty for order placement = int(100*3) = 300
Scale-out AlgoJi_Signal(“1”, “LX”,”AA”,”L|NRML”,””,”305″,”100|1|0.5″,”EQ”,”STG1″);
NetPos=200
Qty for order placement = int(200 *0.5) = 100
sir please provide above code ie Qty Multiplier for scale-out or position sizing use able in afl. above code is not complete or working . Thanx in anticipation .
How can we place order with one side trade I mean if I just need the sell entry and don’t want any buy entry how is it possible, please advise.