1. In my project there are multiple charts for one currency open, each set to a different timeframe. When i run the following, the objects get created on all the timeframes for the pair. By calling SetCurrencyAndTimeframe i was expecting the objects only in the timeframe specified? Is there anything else that should be done?
Code: Select all
SetCurrencyAndTimeframe('EURJPY', 1);
ObjectCreate(TOP_LINE, obj_HLine, 0, Time(0), Close(0));
ObjectCreate(TOPFAR_LINE, obj_HLine, 0, Time(0), Close(0));
ObjectCreate(BOTTOM_LINE, obj_HLine, 0, Time(0), Close(0));
ObjectCreate(BOTTOMFAR_LINE, obj_HLine, 0, Time(0), Close(0));
This also seems the case for when calling SetCurrency.. in GetSingleTick.. specifying a specific timeframe is ignored and the processing run on all timeframe charts for a pair.
2. Is there any way to access which timeframe a tick has come from in GetSingleTick? Or anywhere in the api at all? Or is GetSingleTick only called once per pair per tick?
3. Are there any easy way's to have a new compiled dll register in FT without reinstalling and overriding the dll from the file menu?
4. Similarly, is there any way to get the InitStrategy procedure to get called without reinstalling the strategy!?
Thanks in advance for any advice.
EDIT: My brain just clicked and created indicators instead of strategies as they should be.. which leads to question 6..
6. Is it just for me that ObjectCreate fails in the Init method for an indicator? To make them work i had to call it from calculate. Any background to that most welcome.