Renko Chart: Plot SELL Orders if condition is met

Questions about MultiCharts and user contributed studies.
brunor
Posts: 65
Joined: 11 Feb 2013
Has thanked: 24 times
Been thanked: 6 times

Renko Chart: Plot SELL Orders if condition is met

Postby brunor » 11 Feb 2013

I am plotting E-mini (@ESH13) onto a Renko chart with a resolution - 2000 ticks and box size - 0.25. IQ Feed is the data source.
Is it possible to immediately plot a sell signal once a condition is met? With the code below the sell signal is plotted only once the condition is satisfied and the tick count is zero (bar closed).
I would like to force the Renko chart to plot a box for every movement of 0.25 and a signal once the condition is met, but maintain the tick resolution. Any help would be appreciated.

Code: Select all

[IntrabarOrderGeneration = true]

Inputs:
Int ABC(1);

var:
intrabarpersist var0(0);
var0 = XYZ;


condition1 = var0 > 5;
condition2 = var0 < 10;

if condition1 then
Buy ( "B" ) this bar at Close;
if condition2 then
Sell this bar at Close;

condition3 = var0 < 10;
condition4 = var0 > 5;

if condition3 then
Sell short ( "S" ) this bar at Close;
if condition4 then
buytocover this bar at Close;

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: Renko Chart: Plot SELL Orders if condition is met

Postby Andrew MultiCharts » 12 Feb 2013

Code: Select all

...
...this bar at Close
...
Even though IOG is on, "this bar on close" forces the script not to place order until the bar is close. If you change it to "next bar", the script will be recalculating on every new tick (in auto trading) and orders can be sent/modified/cancelled on every new tick.

brunor
Posts: 65
Joined: 11 Feb 2013
Has thanked: 24 times
Been thanked: 6 times

Re: Renko Chart: Plot SELL Orders if condition is met

Postby brunor » 12 Feb 2013

Thank you for the response. I have made the changes.

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Renko Chart: Plot SELL Orders if condition is met

Postby TJ » 12 Feb 2013

ps.
re: this bar on close
see post #7
viewtopic.php?f=16&t=10811

brunor
Posts: 65
Joined: 11 Feb 2013
Has thanked: 24 times
Been thanked: 6 times

Re: Renko Chart: Plot SELL Orders if condition is met

Postby brunor » 13 Feb 2013

Thanks TJ. That post is very helpful.


Return to “MultiCharts”