|
Rodorush
|
Posted Thursday, June 24, 2010
|
|
Group: Forum Members
Last Active: Thursday, June 30, 2011
Posts: 29,
Visits: 67
|
Hello, I need to store the time interval of the chart in a variable.
I using the same robot in all time intervals... so, to avoid the duplicate order tags, I am using manually the follow tag:
var
Period: String;
OnCreate
AddStringSetting(@Period, 'Period', '1M'); // for 1 minute chart interval
...
CreateOrder(History.Instrument, Account, Amount, bsBuy, NullRate, NullRate, 1, StrategyName+Period);
I would Like to do this automaticly. Is it possible?
[ ]´s
Rodolfo Andrade
www.rodorush.com.br
rodolfo@rodorush.com.br
+55(16)9193-6808
|
|
eMoe
|
Posted Tuesday, July 20, 2010
|
|
Group: Forum Members
Last Active: 2 days ago @ 2:45 AM
Posts: 201,
Visits: 299
|
Hi, Rodorush.
It depends where you want to use the period. If you want to change period of the indicator, you need to apply every new period and recalculate. As for strategy, you can use as much period variables as you want.
Best regards!
|
|
Rodorush
|
Posted Tuesday, July 20, 2010
|
|
Group: Forum Members
Last Active: Thursday, June 30, 2011
Posts: 29,
Visits: 67
|
ok, for exemple:
I have a robot called "RHamari". I will run this robot in "EURUSD" pair. I will put it to run in 15 min., 30 min., 1h, 2h, 4h and 8h. All at same time and at same account. How I have this line to create the orders: CreateOrder(History.Instrument, Account, Amount, bsBuy, NullRate, NullRate, 1, StrategyName+Period);
The only thing that difference the others is my variable "period" that I have to type manually before start all robots. It´s very boring to do this. So I would like to set the variable "Period" automaticaly with time the chart interval. I have to do this to avoid the robots to make mistakes between themselves. I just want a tag to create difference themselves.
[ ]´s
Rodolfo Andrade
www.rodorush.com.br
rodolfo@rodorush.com.br
+55(16)9193-6808
|
|
Den
|
Posted Tuesday, July 20, 2010
|
|
Group: Forum Members
Last Active: Tuesday, September 07, 2010
Posts: 24,
Visits: 36
|
Hi Rodorush.If you want to use different time frames in your strategies you have to describe all these time frames in the head of listing. But I think you can use array for this problems. Unfortunately I have not done it yet. Regards Den
|