Ok! Here's a sample strategy to demonstrate this problem I created using FX Wizard:
I have added a screenshot of the settings
Running it on EUR/USD on the past week (13.02.2017 - 17.02.2017), I get the following error:
- Code: Select all
C:/Program Files (x86)/Candleworks/FXTS2/Strategies/Custom/zig_output_channel_strat.lua:230: C:/Program Files (x86)/Candleworks/FXTS2/Indicators/Custom/ZigZag Channel with Output.lua (409, -1) : E19 - The first parameter must be a number
But when I do the same in "simualtion mode" (where there is more candle data available, not just the chosen range), the backtesting runs fine, but is very slow, and the equity looks like this: (with settings take_profit 0.1 and max_positions 100)
However, sometimes, with different settings, I get a similar error, just talking about "third parameter"
Also, can you please say what stream is "out" corresponding to? I understand "Top" and "Bottom".
But on chart there's also "Up" and in FX Wizard there's "out". Is this causing the error?
Or is it because I am checking every tick for updates? How can I fix this strategy to work in backtester?
Also, I mostly rely on FX Wizard to create my strategies, would you be so kind to inspect the code and advice on any changes I should perform every time, since it's the same template every time, I want to know if there's a better way of writing strategies, since the project has not been updated in a while. By "better" I mean without unecessary code, more efficient, optimal, etc. For example, I like to use (ask + bid / 2) price = median. In this strategy I use this indicator and BB. I have two BB (1 ask and 1 bid) and perform the median calculation to get one reading. I also have "mid_tick" which is the median price, I am sure I could replace the BB source with mid_tick instead of calculating it twice, one for ask and one for bid and dividing by two... And stuff like that.
All suggestions and comments are welcome please.
This strategy uses 3 timeframes: tick, m1, m15
Thanks