×

Sign up and get MultiCharts free

Use its powerful simulation mode with data included out of the box. Just fill out the form and start honing your trading skills with a few clicks.

Changes - MultiCharts

Changes

Jump to navigation Jump to search

4.6.2 Special Orders

8 bytes added, 19:43, 16 January 2019
m
no edit summary
GenerateProfitTarget(5);
</syntaxhighlight>
Sell Limit order will be generated at price = EntryPrice + (AmmountAmount/Contracts)/ BigPointValue = 12,25 + 5/100/10 = 12,255;
Because the price does not correspond to the minimum price increment, it will be rounded to BETTER price, according to the step MinMove* PriceScale = 25*0,01 = 0,25 до to 12,50.
The final ProfitTarget order: Sell 100 contracts at 12,50 Limit;
</div>
The symbol has the following parameters: BigPointValue=100, MinMove=2, PriceScale=0,01.
Assume the short position is opened at the average price 0,982 for 10000 contracts by the two orders SellShort1 1000 at 1,00 и and SellShort2 9000 at 0,98;
Signal code:
GenerateStopLoss(5) in PerContract mode will generate 2 Stop orders (one exit per each entry).
StopLoss order price for the first entry = EntyPrice + Ammount Amount / BigPointValue = 1,00 + 5/100 = 1,00 + 0,05 = 1,05; considering the price step (0,02) is rounded to the WORSE = 1,06.StopLoss order price for the second entry = EntyPrice + Ammount Amount / BigPointValue = 0,98 + 5/100 = 0,98 + 0,05 = 1,03; considering the price step (0,02) is rounded to the WORSE = 1,04.
Final sending orders:
</div>
[[Category:4. Understanding PowerLanguage .NET Programming Giude]]

Navigation menu