Skip to content

Updatet make_Trade function #13

Description

@TomStark1
def make_Trade(self, symbol, cmd, transaction_type, volume, comment="", order=0, sl=0, tp=0, days=0, hours=0, minutes=0):
        symbol_data = self.get_Symbol(symbol=symbol)
        if cmd == 0:
            price = symbol_data["bid"]
        elif cmd == 1:
            price = symbol_data["ask"]
        else:
            price = symbol_data["bid"]
         delay = self.to_milliseconds(days=days, hours=hours, minutes=minutes)
         ... 

I think this is a better way of initialising the price variable.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions