Favorite Futures: spot fx, currency futures, GC, ES
Posts: 30 since Nov 2010
Thanks: 6 given,
Mike, let me make a tiny correction: you cannot trade off any data stream besides data1 (the default one) in Multicharts (or my knowledge is very limited), so you need to have regular bars as data1 and any auxiliary information as data2, data3,...
I think just a single data stream is more than enough here ó and of course no need for external DLLs and other stuff. If I'm not mistaken, the following definition of range bars is correct:
If the above quote is correct, then you just need a very simple code to markup your "range bars" and unwrap them on the regular time-based bars, something like this:
Thus you can add some code which is executed when the range bar is comlete, i.e. when isBarComplete = true. Of course this code works best on tick data, but should also work on N-seconds and N-minutes, of course with some error. Whether this error is significant for you or not ó it's up to you to decide.
The following 3 users say Thank You to Doctor Leo for this post:
The goal is a strategy that will send orders inter bar from range type bars.
Let me see if I have this right.
Build a synthetic bar as you noted above.
Inserts code for the indicator that is driven by the code for the synthetic bar.
Take the above two statements and insert that into a strategy and code the strategy to be driven by the indicator driven by the synthetic bar.
Then place that strategy into a tick chart and and it should be able to place orders inter bar.
I think it will work and I'll let you know if I have any success.
Even with data1 being one minute, all of the orders are being executed on 00 & 30 past the hour (or 01, 31). There's a stochastic trigger on data2 but I just can't get it to execute except on the data2 closes! Very frustrating.
Thing is: if you have the strategy turned off & then turn it on, it will enter into a position at any time it's triggered. It's getting out whenever it's triggered is my problem. I want it to get out regardless of the time (or close, etc).
Any possible ideas would be greatly apprecited!
Last edited by djvie11; December 16th, 2015 at 08:34 AM.
Reason: further explanation