<commit_before><?php

/*

Copyright 2015 <NAME>
<EMAIL>

Licensed under the Apache License, Version 2.0 (the 'License');
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an 'AS IS' BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

*/

if (defined('TAVURTH_OANDAWRAP_EXAMPLE_TRADE') == FALSE) {
	define('TAVURTH_OANDAWRAP_EXAMPLE_TRADE', TRUE);
	
	//Include OandaWrap
	require '../OandaWrap.php';
	
	//apiKey can be found inside your account information 
	//screen and requires a one time generation
	$apiKey 	= 'REPLACE THIS TEXT';
	
	//AccountId is the Id of one of your accounts
	//To later change this use OandaWrap::nav_account_set($accountId)
	$accountId 	= 'REPLACE THIS TEXT';
	
	//Check to see that OandaWrap is setup correctly.
	//Arg1 can be 'Demo', 'Live', or Sandbox;
	if (OandaWrap::setup('Demo', $apiKey, $accountId) == FALSE) {
		echo 'OandaWrap failed to initialize, ';
		echo 'contact <EMAIL> to submit a bug report.';
		exit(1);
	} 
	
	echo 'Buy with a market order and included stopLoss.<br>';
	OandaWrap::format(OandaWrap::buy_market(10, 'EUR_USD', array('stopLoss' => 1.0243)));
	
	echo 'Set buy limit order with included takeProfit.<br>';
	OandaWrap::format(OandaWrap::buy_limit(10, 'EUR_USD', 1.0243, OandaWrap::expiry_day(10), array('takeProfit' => 1.032)));
	
	echo 'Set market if touched buy order with included trailingStop of 10 pips.<br>';
	OandaWrap::format(OandaWrap::buy_limit(10, 'EUR_USD', 1.0243, OandaWrap::expiry_hour(), array('trailingStop' => 10)));
	
	echo 'Buy at market, limiting size so that 2% of account is risked over 20 pips, the set stop 20 pips from current price.<br>';
	OandaWrap::format(OandaWrap::buy_bullish('EUR_USD', 2, 20));
	
}

?><commit_msg>Fixed small text anomoly in example<commit_after><?php

/*

Copyright 2015 <NAME>
<EMAIL>

Licensed under the Apache License, Version 2.0 (the 'License');
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an 'AS IS' BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

*/

if (defined('TAVURTH_OANDAWRAP_EXAMPLE_TRADE') == FALSE) {
	define('TAVURTH_OANDAWRAP_EXAMPLE_TRADE', TRUE);
	
	//Include OandaWrap
	require '../OandaWrap.php';
	
	//apiKey can be found inside your account information 
	//screen and requires a one time generation
	$apiKey 	= 'REPLACE THIS TEXT';
	
	//AccountId is the Id of one of your accounts
	//To later change this use OandaWrap::nav_account_set($accountId)
	$accountId 	= 'REPLACE THIS TEXT';
	
	//Check to see that OandaWrap is setup correctly.
	//Arg1 can be 'Demo', 'Live', or Sandbox;
	if (OandaWrap::setup('Demo', $apiKey, $accountId) == FALSE) {
		echo 'OandaWrap failed to initialize, ';
		echo 'contact <EMAIL> to submit a bug report.';
		exit(1);
	} 
	
	echo 'Buy with a market order and included stopLoss:<br>';
	OandaWrap::format(OandaWrap::buy_market(10, 'EUR_USD', array('stopLoss' => 1.0243)));
	
	echo 'Set buy limit order with included takeProfit:<br>';
	OandaWrap::format(OandaWrap::buy_limit(10, 'EUR_USD', 1.0243, OandaWrap::expiry_day(10), array('takeProfit' => 1.032)));
	
	echo 'Set market if touched buy order with included trailingStop of 10 pips:<br>';
	OandaWrap::format(OandaWrap::buy_limit(10, 'EUR_USD', 1.0243, OandaWrap::expiry_hour(), array('trailingStop' => 10)));
	
	echo 'Buy at market, limiting size so that 2% of account is risked over 20 pips, the set stop 20 pips from current price:<br>';
	OandaWrap::format(OandaWrap::buy_bullish('EUR_USD', 2, 20));
	
}

?>
{'fraction_non_alphanumeric': 0.11682016480853126, 'fraction_numerical': 0.02375181774115366, 'mean_word_length': 4.812676056338028, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2940342', 'n_tokens_mistral': 1465, 'n_tokens_neox': 1311, 'n_words': 479}