Multi IN/OUT setup in one Bar

Questions about MultiCharts and user contributed studies.
User avatar
Smoky
Posts: 507
Joined: 03 Dec 2010
Location: Thailand
Has thanked: 97 times
Been thanked: 115 times

Multi IN/OUT setup in one Bar

Postby Smoky » 15 Dec 2022

hi, what is the setup in IOG to allow many buy and sell signals by bar ? (renko resolution ticks)

i have only 1 buy and 1 sell , even with many trigger signals.

thanks

User avatar
Polly MultiCharts
Posts: 189
Joined: 20 Jul 2022
Has thanked: 1 time
Been thanked: 53 times

Re: Multi IN/OUT setup in one Bar

Postby Polly MultiCharts » 15 Dec 2022

Hello Smoky,

You can allow your strategy to send different amounts of orders depending on the selected IOG mode in Format->Signal->Properties tab. Please find the screenshot attached for reference.

For more info about IOG settings please refer to this page.
Attachments
Format Signal IOG.png
(13.58 KiB) Not downloaded yet

User avatar
Smoky
Posts: 507
Joined: 03 Dec 2010
Location: Thailand
Has thanked: 97 times
Been thanked: 115 times

Re: Multi IN/OUT setup in one Bar

Postby Smoky » 15 Dec 2022

Hello Smoky,

You can allow your strategy to send different amounts of orders depending on the selected IOG mode in Format->Signal->Properties tab. Please find the screenshot attached for reference.

For more info about IOG settings please refer to this page.
Of course, but this setup don't work.
Easy to reproduce, try this code :

Code: Select all

[IntrabarOrderGeneration = True]; var: intrabarpersist OrderName1("NB1"), intrabarpersist OrderName2("NB2"); var: intrabarpersist Tick(0); if barstatus=0 then begin Tick=0; end; Tick=Tick+1; if Tick = 100 then begin sellshort (OrderName1) 1 share next bar at market; messagelog("Sending Order 1 ",OrderName1); end; if Tick = 200 then begin sellshort (OrderName2) 1 share next bar at market; messagelog("Sending Order 2 ",OrderName2); end;
NB1.png
(14.62 KiB) Not downloaded yet
LOG ORDER ENGINE.png
(7.63 KiB) Not downloaded yet
MY SETUP.png
(56.92 KiB) Not downloaded yet


Result : only sending the first trade

may be i forget something ?

User avatar
Polly MultiCharts
Posts: 189
Joined: 20 Jul 2022
Has thanked: 1 time
Been thanked: 53 times

Re: Multi IN/OUT setup in one Bar

Postby Polly MultiCharts » 16 Dec 2022

Smoky,

To allow multiple same-direction entry orders you might try checking the 'Allow up to N entry orders in the same direction as the currently held position' checkbox in Format->Signal->Strategy Properties->Properties tab->Position limit section.
For more info about these settings please refer to this page.


Return to “MultiCharts”