Closed TanapongAUS closed 2 years ago
In addition , at first I would like to apologise for my little knowledge. But I'm quite new about using Gym MTsim. Therefore, could you please give me the example of coding to load dataframe as CSV file. And what are the names of each column that should be consisted in CSV file, so I can arrange to write my csv file properly.
Thank you
Hi @TanapongAUS, I don't understand what you mean by "fix trading volume". What is wrong with that? Can you explain more or bring an example?
I'm kind of busy currently, but I will try to add some examples to the repo. However, you can save the dataframe created here as CSV and see the exact value of columns and rows. Moreover, you can create a similar CSV file and load it to the simulator.
Hi @AminHP, sorry for my bad English. For "fix trading volume", in this case I mean how can I set the trading volume to become constant. for example when I set lot size(trading volume) as 0.5 Then every order will trade with volume of 0.5.
I've tried to set the trading volume and tried to run some random orders by using this code:
observation = env.reset() while True: action = env.action_space.sample() observation, reward, done, info = env.step(action)
But the trading volume sitll be random.
please give me the advice thank you
Does this code work?
action = env.action_space.sample()
action = action.reshape(len(env.trading_symbols), -1)
action[:, -1] = 0.5
action = action.reshape(-1)
Sorry, it does not work.
with this type of error = 'MtSimulator' object has no attribute 'trading_symbols'
Sorry, updated the code.
May I ask, How can I fix trading volume or lot size?
thanks in advance for your answer