Risk warning

All articles, strategies and indicators are just reflecting a single traders opinion and should be viewed as that.
I advice everybody to trade with a DEMO account!

Thursday, March 24, 2011

Some questions and answers.

 Q : Is there any way in CTL code of fixing the graph period use for the strategy, for example 30 minutes. So you can change the graph for viewing more time without affecting the strategy decisions?

A: If i understand it right you want to change the chart to 1 hour for example without affecting the strategy. This can not be done because the strategy runs at the end of each candle. I personally let the strategy run in a small window and i have another window with a chart of the same currency to play with.

Q: I haven't found the correct way to set a market order with a stop loss and limit gain related to the parent order. They have never worked for me. I don't like using fpl to control maximum loss because I'm trading more than one symbol at the same time, so maybe is another symbol which is loosing and not the one in matter.

A: PC-orders (Parent Contingents) are easy to use. Best way is to show with ultra tiny strategy. I just tested it and it works.

strategy test_parent_cont;
input lots = 1;
vars currentbar=0;
begin
 currentbar := back(close);
 if not long() and not short() then
 begin
pc_order(buy(lots), pair(stop_sell(lots,close[currentbar]-0.0005), limit_sell(lots,close[currentbar]+0.0005)));
end;
end.

Q: Is there any way of checking available equity?

A: Sure very easy. Again a ultra tiny strategy to show u. I tested it and it works.

strategy test_equity;
input lots = 1;
vars currentbar=0,saldo=0;
begin
 currentbar := back(close);
 if not long() and not short() then
 begin
 saldo := equity();
 alert("text",numbertostring(saldo));
 end;
end.

Q: Is there any way to configure dealbook to reestablish internet connection and strategies after an internet connection short drop.

A: No, the strategy can not restart on his own. How do you handle this. In case of a strategy that opens and closes positions based on candles or indicators.=> Always open a stop loss order in the strategy and let the strategy cancel it after a position is closed. This way the position and equity is protected at all time.
Secondly if you use PC- orders than you are save anyway. You can also save a number of values in a file. These values can be used to restart the strategy.

No comments:

Post a Comment