Admin questions
Admin questions
20 Dec 2012, 06:21
Hi,
1. in the backtest report... it looks like Net profit is ONLY (gross profit - gross loss)... so it does not include commissions... is that correct?
2. when backtesting... what is the assumed start time and stop time...
ie I test from 12/1/2012 - 12/18/2012... soes it start at 00:00:00 on 12/1/2012 and end at 23:59:59 on 12/1/2012?
Is that GMT or some other timezone?
3. how can I get the previous Bid and previous Ask so I can use in a conditional statement for a robot...
ie.. if(previous Bid = x) do this... and if(previous Bid = x) do this...
4. how can I code my robot to run from the day/session start until either the intraday p/l targets are met or the day/session ends and then flatten the position for the day...
then I want the robot to restart again at the beginning of the next day/session
5. how can I have Robot1 "look" at Robot2 so I can do conditionals based on Robot2's (p/l, position, etc)
ie... if (Robot2 p/l = x)
trade for Robot1
6. can I trade two robots in the same pair (say EUR/USD), and track seperate P/Ls, positions, etcs for each?
Thanks for your help
admin
24 Jan 2013, 14:19
1. in the backtest report... it looks like Net profit is ONLY (gross profit - gross loss)... so it does not include commissions... is that correct?
Correct.
2. when backtesting... what is the assumed start time and stop time...
ie I test from 12/1/2012 - 12/18/2012... soes it start at 00:00:00 on 12/1/2012 and end at 23:59:59 on 12/1/2012?
Is that GMT or some other timezone?
Same as the server time
3. how can I get the previous Bid and previous Ask so I can use in a conditional statement for a robot...
ie.. if(previous Bid = x) do this... and if(previous Bid = x) do this...
declare a variable for previous bid e.g. double previousBid in the global scope which you will set at the end of the OnTick event. So, you can use a condition at the beginning of the tick event to check.
4. how can I code my robot to run from the day/session start until either the intraday p/l targets are met or the day/session ends and then flatten the position for the day...then I want the robot to restart again at the beginning of the next day/session
Create DateTime variables which you will set to the start/end times you desire. Check if the server time is between those times. The profit/loss targets being met should be coded in a condition statement which if true you may call Sleep(timeInMiliSec). timeInMiliSec can be calculated as the remaining time until the session start.
The robots can stopped programmatically but they cannot be started. You may only code it to suspend execution for a desired amount of time.
5. how can I have Robot1 "look" at Robot2 so I can do conditionals based on Robot2's (p/l, position, etc)
ie... if (Robot2 p/l = x)
trade for Robot1
There is no support at the moment to know which trades are created by other robots. You may modify/monitor all the positions under the account, though.
6. can I trade two robots in the same pair (say EUR/USD), and track seperate P/Ls, positions, etcs for each?
Same as above.
@admin