60 lines
4 KiB
MQL5
60 lines
4 KiB
MQL5
//+------------------------------------------------------------------+
|
|
//| TM-Kaufen-Test.mq5 |
|
|
//| Thorsten Fischer Copyright 2020 |
|
|
//| https://mql5.tfsystem.de |
|
|
//+------------------------------------------------------------------+
|
|
#property copyright "Thorsten Fischer Copyright 2020"
|
|
#property link "https://mql5.tfsystem.de"
|
|
#property version "1.00"
|
|
#property strict
|
|
|
|
#include "..\..\TF-Dateien\TF-Class\TFTrade.mqh"
|
|
|
|
CTFTrade ExtTrade;
|
|
|
|
//+------------------------------------------------------------------+
|
|
//| Expert initialization function |
|
|
//+------------------------------------------------------------------+
|
|
int OnInit()
|
|
{
|
|
//---
|
|
MqlTradeRequest request;
|
|
MqlTradeResult result;
|
|
//---
|
|
request.action=TRADE_ACTION_DEAL;
|
|
request.symbol=Symbol();
|
|
request.volume=0.1;
|
|
request.type=ORDER_TYPE_BUY;
|
|
request.type_filling=ORDER_FILLING_FOK;
|
|
//---
|
|
if(OrderSend(request, result))
|
|
Print("Order 1 ausgeführt");
|
|
//---
|
|
request.type_filling=ORDER_FILLING_IOC;
|
|
//---
|
|
if(OrderSend(request, result))
|
|
Print("Order 2 ausgeführt");
|
|
//---
|
|
request.type_filling=ORDER_FILLING_RETURN;
|
|
//---
|
|
if(OrderSend(request, result))
|
|
Print("Order 3 ausgeführt");
|
|
//PositionSelect()
|
|
//---
|
|
return(INIT_SUCCEEDED);
|
|
}
|
|
//+------------------------------------------------------------------+
|
|
//| Expert deinitialization function |
|
|
//+------------------------------------------------------------------+
|
|
void OnDeinit(const int reason)
|
|
{
|
|
//---
|
|
}
|
|
//+------------------------------------------------------------------+
|
|
//| Expert tick function |
|
|
//+------------------------------------------------------------------+
|
|
void OnTick()
|
|
{
|
|
//---
|
|
}
|
|
//+------------------------------------------------------------------+
|