Und ja, ich kann Code für "5-digit-Brokers ergoogeln, da kommt aber mein nächstes Problem:
"Point" ist bei mir aus für mich unerfindlichen Gründen 0, also brauche ich damit wohl nix zu multiplizieren ...
zB.:Code for 5-digit brokers
//+------------------------------------------------------------------+
//| Tutorial15.mq4 |
//| Copyright 2014, ForexBoat |
//|
Forex Trading Training Courses For Beginners - Learn The Basics and What It Is |
//+------------------------------------------------------------------+
#property copyright "Copyright 2014, ForexBoat"
#property link "http://www.forexboat.com"
#property version "1.00"
#property strict
#property script_show_inputs
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
extern int TakeProfit = 10;
extern int StopLoss = 10;
void OnStart()
{
double TakeProfitLevel;
double StopLossLevel;
TakeProfitLevel = Bid + TakeProfit*
Point*10; //0.00001 * 10 = 0.0001
StopLossLevel = Bid - StopLoss*Point*10;
Alert("TakeProfitLevel = ", TakeProfitLevel);
Alert("StopLossLevel = ", StopLossLevel);
OrderSend("EURUSD", OP_BUY, 1.0, Ask, 10*10, StopLossLevel, TakeProfitLevel, "My 1st Order!"); //notice that slippage also has to be multiplied by 10
}
//+------------------------------------------------------------------+