TakeProfit is not shown in broker platform(Oanda and FXCM MT4)

Posted By: zorroborro

TakeProfit is not shown in broker platform(Oanda and FXCM MT4) - 03/06/18 03:09

Hello,

MISSION:
I am trying to build my first robot, but already having issues.
I coded to buy every minute with stoploss and takeProfit. This is the code:
Code:
function run()
{
	set(LOGFILE);
	//StartDate = 2017;
	BarPeriod = 1;
	Stop = price() - 0.00046;
	TakeProfit = price() + 0.00046;
	enterLong();
	//printf("stoploss is %f, takeprofit is %f", Stop, TakeProfit);
}



THE PROBLEM:
It doesn't show the Take Profit when it enter the trade, either in fxcm MT4 and TradingStation platform, either in Oanda desktop platform. It shows Stop Loss.


Why is that?

Thank you
Posted By: Spirit

Re: TakeProfit is not shown in broker platform(Oanda and FXCM MT4) - 03/06/18 12:17

Thats ok. You dont want the broker to know your stop and takeprofit, do you? wink

http://manual.zorro-project.com/stop.htm
Posted By: AndrewAMD

Re: TakeProfit is not shown in broker platform(Oanda and FXCM MT4) - 03/06/18 12:43

The broker API does not submit take profit to the broker. Instead, it withholds the TP value until it is time to close the trade/position.
Posted By: zorroborro

Re: TakeProfit is not shown in broker platform(Oanda and FXCM MT4) - 03/06/18 20:12

Originally Posted By: Spirit
Thats ok. You dont want the broker to know your stop and takeprofit, do you? wink

http://manual.zorro-project.com/stop.htm


Originally Posted By: AndrewAMD
The broker API does not submit take profit to the broker. Instead, it withholds the TP value until it is time to close the trade/position.


@Spirit, Oh I see:
Quote:

All stop, profit, trail, or entry limits are normally handled by software and controlled at each tick. They are not sent to the broker's server (except for OrderLimit and the 'fake' stop given by StopFactor) and thus not visible to the broker, this way preventing "stop hunting" or similar practices.

But then how is the Stop loss visible?
But I have to say, its not the one I set up.

@AndrewAMD, @Spirit, I would stil like to have a report for myself of all the trades with SL and TP I did. Is it possible with zorro to create csv file for report?
Thanks guys
Posted By: AndrewAMD

Re: TakeProfit is not shown in broker platform(Oanda and FXCM MT4) - 03/06/18 21:01

Originally Posted By: zorroborro
But then how is the Stop loss visible?
Stop is definitely in the broker API, but not TP.
© 2024 lite-C Forums