PureBytes Links
Trading Reference Links
|
I'm not sure what you meant by "SL". But here's your basic code:
Buy Order:
Hour() > 13 AND Hour() < 17 AND Ref(Cross(C, Mov(C,50,E)),-1) AND H > Ref(H,-1)
Sell Order:
Hour() > 13 AND Hour() < 17 AND Cross(Mov(C,50,E),C)
========================================
Here's another code with my intrepretation of "SL":
Buy Order:
Hour() > 13 AND Hour() < 17 AND Ref(Cross(C, Mov(C,50,E)),-1) AND H > Ref(H,-1)
Sell Order:
Hour() > 13 AND Hour() < 17 AND L < ValueWhen(1 , Cross(C, Mov(C,50,E)), L)
Sell Short Order:
Hour() > 13 AND Hour() < 17 AND Ref(Cross(Mov(C,50,E),C),-1) AND L < Ref(L,-1)
Buy to Cover Order:
Hour() > 13 AND Hour() < 17 AND H > ValueWhen(1 , Cross(Mov(C,50,E), C), H)
You might want to consider removing the hour restriction on the Sell Order and Buy to Cover Order!
To: equismetastock@xxxxxxxxxxxxxxx From: sethuramansid@xxxxxxxxx Date: Sat, 21 Feb 2009 06:03:12 +0000 Subject: [EquisMetaStock Group] Backtesting
Dear All Friends,
I have very little knowledge with metastock software. I want to backtest my trading strategy. I want to test the system based on following the conditions
1. Testing to be done in 5 min chart 2. When price cross above 50 period EMA,if the very next bar is going higher than crossing bars high, buy should be triggered. SL is the low of the crossing bar. 3. Selling should be triggered in the next bar when price crossing below 50 period EMA,SL is cross bars high. 4. This should be done between a particular period for every day,(i.e 1.00 PM to 5.00 PM like this)
Can anyone give me the coding for the above conditions.
Waiting for your replies.
__._,_.___
__,_._,___
|
|