0 registered members (),
1,209
guests, and 0
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Need help with script
[Re: jcl]
#433355
11/28/13 13:20
11/28/13 13:20
|
Joined: Oct 2012
Posts: 48
Chaosfreak
Newbie
|
Newbie
Joined: Oct 2012
Posts: 48
|
Ok .. I'll try. Line 4: LookBack = 0; LookBack is set to 0, so all indicators don't have any lookback period and thus generate 0 as value. It's really dangerous because "Stop" will also be set to 0 and all trades will have no SL.
|
|
|
Re: Need help with script
[Re: Chaosfreak]
#433362
11/28/13 15:12
11/28/13 15:12
|
Joined: Jul 2013
Posts: 110
bfleming
OP
Member
|
OP
Member
Joined: Jul 2013
Posts: 110
|
Ok .. I'll try. Line 4: LookBack = 0; LookBack is set to 0, so all indicators don't have any lookback period and thus generate 0 as value. It's really dangerous because "Stop" will also be set to 0 and all trades will have no SL. Alas, no... The original strategy has a lookback of 500. I ran the test script with a lookback period greater than 0 and the problem still persists. Also, the script without ATR stop had a lookback of 0 and worked fine. (BTW, the "Error 014: Function ATR TimePeriod 60 > LookBack" that you see in FXCM_MT4 screenshot only appears when the platform has an ATR indicator running. Where there was no ATR indicator, there was no error message.)
Last edited by bfleming; 11/28/13 15:19.
|
|
|
Re: Need help with script
[Re: jcl]
#433432
11/29/13 14:54
11/29/13 14:54
|
Joined: Jul 2013
Posts: 110
bfleming
OP
Member
|
OP
Member
Joined: Jul 2013
Posts: 110
|
JCL, I appreciate all the effort and help you given, and I've understood every step and understand everything you've pointed me to in the manual, but none of this has actually resolved the problem. The problem is still as it was in the first post. The original script - which you say looks fine - is opening trades with risk (and consequently also take profit) completely different from what the risk actually should be, namely: it opened with risk of 345 when it should be 34.5 in the case of the AUDUSD trade and risk of 391 when it should be 22 in the case of USDCHF trade.
We've established that:
1) my broker account is a micro account 2) I simulated the strategy on a micro account 3) the strategy has a sufficient lookback period for the ATR to function 4) Zorro is opening the test script correctly with the broker, with the correct risk based on ATR (I just confirmed that by increasing Stop = 10*ATR)
And yet, despite the fact that all of this is in order, when Zorro runs the original strategy, it gets the risk wrong.
So, is there anything else we should be looking at? Would it matter that I didn't train the strategy on the broker's data, but on the data downloaded from your site? Or if there was any price history missing? Or missing bars?
I've just amended the strategy to trade on the 1minute bar so I could watch it trade, and I can confirm that it's opened the trade with the proper risk. I'll return to running it on its proper time frame to see if the problem comes up again.
Last edited by bfleming; 11/29/13 15:15.
|
|
|
|